Skip to content

Snippets

Marko Njegomir edited this page Oct 17, 2019 · 2 revisions

Snippets

Creating and inserting code snippets can speed up your coding.

Inserting snippets

To insert a snippet, type in a snippet name and press Ctrl + Space, and the snippet will be inserted in the code at the same location.

Snippet editor

To open an editor for code snippets select the Edit code snippets option from the Edit drop-down menu.

In the snippet editor, a list of existing snippets is displayed on the left side of the window.
On the right side is a field with the name of the selected snippet, and a larger text field with the contents of the snippet.

Adding snippet

To add a snippet, press the Add button, and enter a unique snippet name, then click the Ok button.

Removing snippet

To remove a snippet, select the snippet in the list of snippets, and press the Remove button, and then confirm you want to remove the snippet.

Change snippet name

To change the name of the snippet, select the snippet in list of snippets on the left, and then change the name of the selected snippet in the field on the right. You have to choose an unique name for the snippet.
Then you need to press the Apply or Ok button to confirm the changes.

Change snippet content

To change the content of the snippet, select the snippet in list of snippets on the left, and then change the content of the selected snippet in the big text field on the right.
Then you need to press the Apply or Ok button to confirm the changes.

Canceling changes

If you don't want to save the changes you made while editing snippet, you can just select some other snippet without clicking Apply button beforehand, or just click the Cancel button.

Reset to default

Reset to default will delete all the snippets in the snippet list, and populate it with the default snippets. This will delete all snippets created by the user, and any changes made to the default snippets will be lost.