Ruby In Steel :: Help Index :: SapphireSteel Software Front Page Return to the Index
Inserting Snippets Into The Code Editor
See Also

Glossary Item Box

To Insert A Snippet From A Menu

Right-click at the point in the editor where you would like to insert the snippet. Click Insert Snippet on the shortcut menu. Scroll down to the name of the desired snippet and double-click it or press TAB to insert the snippet into your code.

To Insert A Snippet From A Shortcut

Snippet shortcuts are short bits of text which are expanded by pressing TAB; they are listed in the Code Snippets Manager. For example, if you have a snippet with the shortcut ifelse you could enter the text ifelse into the code editor and press TAB to auto-expand the snippet.


Note: in order to enable TAB-expansion of snippets, 'Expand snippets by tab character' must be enabled in the Text Editor, Ruby, IntelliSense page of the Options dialog.

Adding Custom Data To A Snippet

When inserted into your code, some snippets have one or more highlighted fields ('replacement points'). If you hover your mouse pointer over a replacement point, a descriptive tooltip appears. You may edit a replacement point (say by changing it to the name  of a particular variable) and, if there are more replacement points, you may move directly from one to the next by pressing the TAB key. Where multiple replacement points have the same name, editing one will automatically change the others to match.

See Also