Snippets

Snippets are small pieces of commonly used code that you can drag and drop into documents. Snippets are project based, so you must have an open project before you can start using them.


Snippets group in the project window.

Topics

8.0 Using Snippets

Snippets are meant to help you quickly save and insert pieces of text and therefore are drag and drop based.

The basic usage is:

  • Drop text into the snippets group to create a new snippet with the contents of the drag.
  • Drag items from the snippets group to a document to insert the contents of the snippet into the document.
  • Note that in tabbed editors you can drag snippets onto the tab bar to create a new empty document with the contents of the snippet.

8.1 Making New Snippets

You can create new empty snippets by:

  • Selecting the Add Snippet (control-command-N) item in the project action menu or in the project contextual menu under the Add sub-menu.

8.2 Editing Snippets

To edit the name or contents of a snippet do the following:



Editing a snippet.