## Templates

Templates are a way to associate a few characters with an entire phrase or several lines of code. Then, when you type those defined few characters, the phrase/code block is inserted in their place. This comes in handy when there are lengthy phrases you often type while programming; for example, in Java you can associate "psfi" with "public static final int".

You can view, add, modify, and remove templates from the Templates panel of the Options dialog.

A template consists of an abbreviation, which is the identifier you type to be replaced with other text (in the previous example, the "psfi"), text inserted before the caret, and text inserted after the caret. The abbreviation can only consist of letters, numbers, and underscores ("_"). When a recognized abbreviation is typed, followed by a space (" "), RText looks through its known templates to see if there is a match. If there is, the abbreviation is replaced with the before-caret and after-caret text, with the caret placed between them. If no template matches the specified abbreviation, the space is inserted as normal.

A set of common abbreviations comes standard with RText; these should be useful when programming in C, C++, C#, and Java. Again, feel free to implement your own!

See also: Searching for text