The snippets tool can be used to quickly share code snippets with your team in a variety of languages, complete with syntax highlighting! Additionally, team members can comment on and easily copy the snippets into a variety of locations - wiki pages, tickets, messages, etc.
Installing the Snippets tool
To install the snippets tool, visit the Admin tab of your Space and then click on the Tools section at the top of the page. Scroll to the bottom and click Add next to the Snippets tool to add it to your Space.
Creating a new Snippet
To create a new Snippet, open the + New Snippet tab. A blank Snippet will open, with a text box for its name and a text box for the code snippet. Below these, a drop down menu will allow the user to select the language the Snippet is written in. When code snippet is complete, select Create to finish.
As mentioned, snippets can be written in a number of languages with syntax highlighting and indentation. The available languages are shown below.
What can I do with Snippets?
Once a Snippet has been created, viewing the Snippet will show, in addition to the content of the Snippet itself, its name, the user who authored it, and the date and time that it was created.
Additionally, underneath the Snippet is a button which copies the Snippet markup for use in embedding the Snippet in other locations. Simply click on the clipboard button to the right of the text located below the Snippet and then paste the markup from your clipboard to embed the Snippet in a variety of locations.
For example, Snippets can be embedded in Wiki pages in this way to easily display the code snippet.
Save the page and your snippet will now show inline. Any changes to the main snippet will reflect wherever it is embedded.
Have questions? Email us at email@example.com