VS VB6 VBA
The section of the tab allows you to maintain the code templates of your personal code library (there is also a team code library in the tab), to be used by the Code Library feature:

There is a root folder (that cannot be removed or renamed) for each supported language or technology.
You can:
- Create (nested) folders inside each root folder (with the button).
- Create code templates (with the button).
- Rename folders (with the button).
- Delete folders (with the button).
- Edit code templates (with the button).
- Delete code templates (with the button).
- Export code templates to a file (with the button), to be imported on another computer, or to move code templates between the team code library and the personal code library.
- Import code templates (with the button), either from a file or from code snippets.
Also, you can add the selected text in a code window to a new code template in the using the entries on the context menu.
To create a code template you use the following window:

In this window you enter the following properties:
- : a text describing the code template.
- : the actual text of the code template. Using the button, you can include in the text predefined variables (whose value is assigned automatically by , such as selected text, name of method, etc.) or user-defined variables (whose value is asked when the code template is inserted).
- : the author of the code template.
- : a comment or explanation about the code template.
For :
- (optional): a keyword that you can type in the code window and then "expands" it to the whole template text. This can save you time since you avoid the use of the Code Library toolwindow. To learn how to expand a keyword see Keyword Expansion.
- (optional): provides nine commands ( ... for Visual Studio 2015 and higher, and ... for Visual Studio 2013 and lower) that you can associate with code templates. When you execute a code template command (typically through a keyboard shortcut, or creating a button on a toolbar from that command), the associated code template text is inserted in the code.
For :
- (optional): a keyword that you can type in the code window and then "expands" it to the whole template text. This can save you time since you avoid the use of the Code Library toolwindow. To learn how to expand a keyword see Keyword Expansion.
- (optional): you can define a keyboard shortcut that, when invoked, the associated code template text is inserted in the code.
See Also:
Code Library
Predefined Variables
User-defined Variables
Keyboard Shortcuts Options
|