Code Snippets are closely related to Templates, but instead of defining the content of an entire note, a snippet is a reusable piece of code that can easily be inserted into a Code note.

## Creating a Code snippet

In the Note Tree:

1. Right-click the note where you want to place the snippet.
2. Select Insert child note.
3. Select Code snippet.

Then simply type the desired code into the note and set the correct language mode.

The note's title becomes the title of the snippet. Optionally, you can add a description in the Promoted Attributes section.

## Inserting a snippet

To insert a snippet, type `/snippet` and select its title from the dropdown.

Only code snippets whose language mode matches the current code note are listed. For example, a CSS code note shows only CSS snippets, not JavaScript ones. The exception is snippets set to "Plain text", which are available in Markdown notes and any code note regardless of its language mode.

## Limitations

- Unlike Templates, snippets cannot be limited to a particular workspace.