Date
Reserved strings expand to the system date, or portions thereof, in various formats.
Reserved String | Meaning | Case Variants |
---|
$DATE$ | Year/month/day formatted as "yyyy/MM/dd" | |
$DATE_LOCALE$ | Current date in locale format | Yes |
$DAY$ | Day of month as number (without leading zero) | |
$DAY_02$ | Day of month formatted as "dd" | |
$DAYNAME$ | Day abbreviation in locale format | Yes |
$DAYNAME_EN$ | Day abbreviation in English | Yes |
$DAYLONGNAME$ | Full name of day in locale format | Yes |
$DAYLONGNAME_EN$ | Full name of day in English | Yes |
$MONTH$ | Month as number (without leading zero) | |
$MONTH_02$ | Month formatted as "MM" | |
$MONTHNAME$ | Month abbreviation in locale format | Yes |
$MONTHNAME_EN$ | Month abbreviation in English | Yes |
$MONTHLONGNAME$ | Full name of month in locale format | Yes |
$MONTHLONGNAME_EN$ | Full name of month in English | Yes |
$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 String | Meaning |
---|
$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 String | Meaning | Case Variants |
---|
$FILE$ | Full filename with path | Yes |
$FILE_BASE$ | Filename without path or extension | Yes |
$FILE_EXT$ | Filename extension | Yes |
$FILE_PATH$ | Path of file | Yes |
Project/Solution
Reserved String | Meaning | Case Variants |
---|
$PROJECT_FILE$ | Full filename of project | Yes |
$PROJECT_NAME$ | Filename of project without path or extension | Yes |
$PROJECT_EXT$ | Filename extension of project | Yes |
$PROJECT_PATH$ | File path of project | Yes |
$SOLUTION_FILE$ | Full filename of solution | Yes |
$SOLUTION_NAME$ | Filename of solution without path or extension | Yes |
$SOLUTION_EXT$ | Filename extension of solution | Yes |
$SOLUTION_PATH$ | File path of solution | Yes |
General
Reserved String | Meaning |
---|
$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 String | Meaning |
---|
$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 String | Meaning | Case Variants |
---|
$GUID_DEFINITION$ | Generated GUID formatted for use in a definition | UPPER only |
$GUID_STRING$ | Generated GUID formatted for use in a string | UPPER only |
$GUID_STRUCT$ | Generated GUID formatted for use in a struct | UPPER only |
$GUID_SYMBOL$ | Generated GUID formatted with underscores | UPPER 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 String | Meaning |
---|
$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