Using abbreviations reduces the time spent typing long but commonly used strings. For example, in Java mode, the abbreviation "sout" is defined to expand to "System.out.println()", so to insert "System.out.println()" in a Java buffer, you only need to type "sout" followed by Control-;. Each abbreviation can either be global, in which case it will expand in all edit modes, or mode-specific. Abbreviations can be edited in the Abbreviations pane of the Utilities>Global Options dialog box; see the section called "The Global Options Dialog Box". The Java, VHDL and XSL edit modes include some pre-defined abbreviations you might find useful.
Edit>Expand Abbreviation (keyboard shortcut: Control-;) attempts to expand the word before the caret. If no expansion could be found, it will offer to define one.
Automatic abbreviation expansion can be enabled in the Abbreviations pane of the Utilities>Global Options dialog box; see the section called "The Global Options Dialog Box". If enabled, pressing the space bar after entering an abbreviation will automatically expand it.
If automatic expansion is enabled, a space can be inserted without expanding the word before the caret by pressing Control-E V Space.
Positional parameters are an advanced feature that make abbreviations much more useful. The best way to describe them is with an example.
Suppose you have an abbreviation "F" that is set to expand to the following:
for(int $1 = 0; $1 < $2; $1++) |
Now, simply entering "F" in the buffer and expanding it will insert the above text as-is. However, if you expand F#j#array.length#, the following will be inserted:
for(int j = 0; j < array.length; j++) |
Expansions can contain up to nine positional parameters. Note that a trailing hash character ("#") must be entered when expanding an abbreviation with parameters.