The Snippet Browser provides access to a library of built-in code snippets, organized by language. Snippets are a great way to dramatically speed up scripting time by never having to write the same script code twice. Instead, save commonly-used code as Snippets where it can be easily reused.
To show / hide the Snippet Browser
•On the ribbon, click the View tab and then check (to show) or uncheck (to hide):
To insert a snippet from the Snippet Browser
•Drag a snippet from the Snippet Browser into the code editor.
To insert a snippet from the code editor
•Place your cursor in the code editor and then double-click a snippet in the Snippet Browser.
-OR-
•Place your cursor in the code editor, type the Snippet name and then press Ctrl+J.
Snippets are language-specific. When using the Ctrl+J technique, only Snippets in the current scripting language are inserted.
To add, remove, or rename a snippet or snippet folder
•Right-click the Snippet Browser pane (not the title bar), a snippet, or a snippet folder > then select the appropriate option:
Change the snippet source directory
By default, PrimalScript keeps its Snippets in the %ProgramData%\SAPIEN\PrimalScript yyyy\Snippets directory. However, you can change the directory where PrimalScript gets the snippets that it displays in the Snippet Browser.
•Click File > Options > Script Settings > Directories, and then enter an alternate path in the Snippets field, including a UNC path.
See also: