# Snippets

![](https://3597805814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3XSZSwWow0fDf6fQJobd%2Fuploads%2Fgit-blob-65b2f00e275bde7c236bdca7829fd9c877e448b9%2Fscripteditor_snippets.png?alt=media)

The snippets panel lets you create and manage _code snippets_. These are intended to let you keep and curate a collection of small fragments of code that you might use often. The panel also lets you access the boilerplate templates for the various [script event handlers](../../reference/scripting_reference/scripting_events), making it easy to add support for an event to an existing script.

Opus maintains multiple sets of snippets for different languages - the dropdown at the top of the panel lets you select the language you want. You can add your own languages by duplicating one of the standard language files in the `/dopusdata/Script Snippets` folder.

### Adding snippets

To add your own snippet, copy it to the clipboard, and then right-click on the list background (or on the _Your Snippets_ heading, if it's visible), and choose the **Paste New Snippet** command. You can rename and delete existing snippets using the context menu as well.

### Using snippets

To use a snippet, you can either:

* Right-click on it and choose **Copy** to copy it to the clipboard
* Double-click it to copy it to the clipboard
* Drag and drop it onto a code editor
