Code Templates
The editor provides the ability to use code templates. A code template is a
block of frequently used source code that can be inserted automatically by using
a particular key sequence. A '|' character is used in the template to indicate
the required position of the cursor after the template has been expanded.
To view code templates
- Select Edit | Advanced | View Code Templates menu item.
Code templates can either be expanded manually or automatically when the Space
key is pressed.
To expand a code template manually
- Type a key sequence, for example the keys c followed by b
for the comment block template.
- Select Edit | Advanced | Expand Template or type Ctrl+J
to expand the template.
To expand the template automatically
- Ensure the Expand Templates On Space editor property is enabled.
- Type a key sequence, for example the keys c followed by b
for the comment block template.
- Now type Space key to expand the template.
Editing Macros
The editor has a number of built-in macros for carrying out common editing
actions.
To declare a type
- Select Edit | Editing Macros | Declare Or Cast To menu item
for required type.
To cast to a type
- Select text in the editor containing expression to cast.
- Select Edit | Editing Macros | Declare Or Cast To menu item
for required type cast.
To insert a qualifier
- Select Edit | Editing Macros | Insert menu item for required qualifier.
Tab Characters
The editor can either use tab characters or only use space characters to fill
whitespace. The use of tabs or spaces when indenting can be specified in the
editor's language properties. The editor can also add or remove tabs characters
in blocks of selected text.
To replace spaces with tab characters in selected text
- Select text.
- Select Edit | Advanced | Tabify Selection menu item
To replace tab characters with spaces in selected text
- Select text.
- Select Edit | Advanced | Untabify Selection menu item
Changing Case
The editor can change the case of selected areas of text.
To change case of selected text to uppercase
- Select text.
- Select Edit | Advanced | Make Selection Uppercase menu item.
To change case of selected text to lowercase
- Select text.
- Select Edit | Advanced | Make Selection Lowercase menu item.
Commenting
The editor can add or remove language specific comment characters to areas
of text.
To comment out an area of selected text
- Select text to comment out.
- Select Edit | Advanced | Comment menu item.
To uncomment an area of selected text
- Select text to remove comment characters from.
- Select Edit | Advanced | Uncomment menu item.
Indentation
The editor can increase or decrease the indentation level of an area of selected
text.
To increase indentation of selected text
- Select text.
- Select Edit | Advanced | Increase Line Indent menu item.
To decrease indentation of selected text
- Select text.
- Select Edit | Advanced | Decrease Line Indent menu item.
Sorting
The editor can sort areas of selected text in ascending or descending ASCII
order.
To sort selected lines into ascending order
- Select text to sort.
- Select Edit | Advanced | Sort Ascending menu item.
To sort selected lines into descending order
- Select text to sort.
- Select Edit | Advanced | Sort Descending menu item.
Text Transposition
The editor can transpose word or line pairs.
To transpose the word at the current cursor position with the previous word
- Select Edit | Advanced | Transpose Words menu item.
To transpose the current line with the previous line
- Select Edit | Advanced | Transpose Lines menu item.
Whitespace
To make whitespace visible
- Select Edit | Advanced | Visible Whitespace menu item.