Add Snippets to the Database

You can add your own code snippets to the database as follows:

  1. Click the Add Snippet button toolbar button or choose the Database | Add Snippet menu option.
  2. Provide information about the snippet, along with its source code in the resulting Add a Snippet dialog box.

Existing user-defined snippets can be edited or deleted by selecting the required snippet and choosing the Edit Snippet and Delete Snippet options on the Database menu or using the Edit Snippet button or Delete Snippet button toolbar buttons.

Snippets can be categorised using any of the existing categories, or you can define your own using the Database | Add Category menu item. You can also rename your categories (Database | Rename Category) and delete them when no longer needed (Database | Delete Category). If you don't want to categorise them, just use the predefined User Defined Snippets category to keep them together.

Changes to the user database are indicated by the display of a "Modified" flag in the status bar. The database can be saved using the Database | Save User Database menu option or the Save User Database button toolbar button. Note: the user database is automatically saved when CodeSnip is closed normally. The database can also be backed up and restored from the Database menu.

Snippets from the main database cannot be edited or deleted. User defined snippets are displayed in a different colour to the snippets from the main database.