Code Snippets Library

The Code Snippets Library is displayed in the Resources window. This function lets you create a personalized code list that you can insert in your document. Personal codes can be classified by category, programming language, etc.

  1. Select the command Display|Display Code Snippets Library.
    You can also use the shortcut key SHIFT + F8. (See the List of Shortcut Keys).

Displaying the Code Snippets Library

The element Library Code Snippets displays a tree, containing the list of all folders and subfolders you have created and their codes.

Creating a folder

  1. Select the folder in which you want to create a subfolder.

  2. Enter the folder name in the dialog box  New Folder.

Adding a code to the library

  1. Place your cursor on the file, or class the code, then click on the button Add an Item .
    The dialog box Item Properties opens.

  2. Enter a name in the dialog box Item Name.  

  3. In the zone Text to Insert before Selection, enter the text you want displayed in front of the selected content in the Edit Window (at the start). E.g.: for HTML or XML code, enter the start tag.

  4. In the zone Text to Insert after Selection, enter the text you want displayed following the selected content in the Edit window (at the end).
    E.g.: for HTML or XML code, enter the end tag.

  5. Check the box Do Not Overwrite Selected Text, to ensure the selected content is not deleted once you insert code.

  6. Click on OK to save the code.

Inserting a Library Code in the document

  1. In the Edit window, select the text you want inserted within the code.

  2. In the Code Snippets Library window, select the code to insert.

  3. Click on the Insert in Document button.
    The text is now inserted within the text preceding and following the selection.

Deleting and editing a library code

  1. Select the code to be modified.