VA Snippet placeholder

Date

Reserved strings expand to the system date, or portions thereof, in various formats. 

Reserved StringMeaningCase Variants
$DATE$Year/month/day formatted as "yyyy/MM/dd" 
$DATE_LOCALE$Current date in locale formatYes
$DAY$Day of month as number (without leading zero) 
$DAY_02$Day of month formatted as "dd" 
$DAYNAME$Day abbreviation in locale formatYes
$DAYNAME_EN$Day abbreviation in EnglishYes
$DAYLONGNAME$Full name of day in locale formatYes
$DAYLONGNAME_EN$Full name of day in EnglishYes
$MONTH$Month as number (without leading zero) 
$MONTH_02$Month formatted as "MM" 
$MONTHNAME$Month abbreviation in locale formatYes
$MONTHNAME_EN$Month abbreviation in EnglishYes
$MONTHLONGNAME$Full name of month in locale formatYes
$MONTHLONGNAME_EN$Full name of month in EnglishYes
$YEAR$Year as number 
$YEAR_02$Year formatted as "yy" 

Time

Reserved strings expand to the system time, or portions thereof, in various formats.

Reserved StringMeaning
$HOUR$Hour as number (without leading zero)
$HOUR_02$Hour formatted as "HH"
$MINUTE$Minute formatted as "mm"
$SECOND$Second formatted as "ss"

File

Reserved strings expand to properties of the active document in the text editor, in original case or in uppercase.

Reserved StringMeaningCase Variants
$FILE$Full filename with pathYes
$FILE_BASE$Filename without path or extensionYes
$FILE_EXT$Filename extensionYes
$FILE_PATH$Path of fileYes

Project/Solution

Reserved StringMeaningCase Variants
$PROJECT_FILE$Full filename of projectYes
$PROJECT_NAME$Filename of project without path or extensionYes
$PROJECT_EXT$Filename extension of projectYes
$PROJECT_PATH$File path of projectYes
$SOLUTION_FILE$Full filename of solutionYes
$SOLUTION_NAME$Filename of solution without path or extensionYes
$SOLUTION_EXT$Filename extension of solutionYes
$SOLUTION_PATH$File path of solutionYes

General

Reserved StringMeaning
$clipboard$Text in clipboard
$end$Desired position of caret after expansion
$selected$Current selection; null if there is no selection
$$Literal '$' character

Symbol Context

Reserved strings expand to values from the context of the caret when the VA Snippet is invoked. The strings expand to null when the position or context of the caret is unavailable, e.g. in VA Snippets used by refactoring features.

Reserved StringMeaning
$MethodName$Name of containing method
$MethodArgs$Method parameters
$ClassName$Name of containing class
$BaseClassName$Name of base class of containing class
$NamespaceName$Fully qualified namespace name

GUID

Reserved strings expand to Globally Unique Identifiers. All instances of a reserved string in a VA Snippet expand to the same GUID.

Reserved StringMeaningCase Variants
$GUID_DEFINITION$Generated GUID formatted for use in a definitionUPPER only
$GUID_STRING$Generated GUID formatted for use in a stringUPPER only
$GUID_STRUCT$Generated GUID formatted for use in a structUPPER only
$GUID_SYMBOL$Generated GUID formatted with underscoresUPPER only

Refactor

Reserved strings are unique to the refactoring and code-generation features of Visual Assist, and expand to null when used in other VA Snippets.

Reserved StringMeaning
$GeneratedPropertyName$Property name generated during Encapsulate Field
$generatedPropertyName$Same as $GeneratedPropertyName$ but with first letter in lowercase
$MethodArg$One parameter of the method and its type
$MethodArgName$One parameter of the method
$MethodArgType$Type of one parameter of the method
$MethodBody$Body of implementation
$MethodQualifier$Optional qualifiers of method
$ParameterList$Parameters separated by commas
$SymbolContext$Context and name of method
$SymbolName$Name of method
$SymbolPrivileges$Access of method
$SymbolStatic$Keyword static or null
$SymbolType$Return type of method
$SymbolVirtual$Keyword virtual or null
$MemberInitializationList$Initialization list of class created from usage (when parameters are present at call site)
$InitializeMember$Initialization of member of C struct created from usage (when parameters are present at call site)
$MemberType$Type of member in class created from usage (when parameters are present at call site)
$MemberName$Name of member in class created from usage (when parameters are present at call site). Name is copied from call site for non-constants.
$colon$Colon if class created from usage initializes members (when parameters are present at call site)

参考: http://docs.wholetomato.com/default.asp?W262

转载于:https://my.oschina.net/zbchmain/blog/709162

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值