A snippet is a tiny area of reusable source code, machine code, or text in programming.

Any user-defined, continuous section of source code may be taken as a snippet from source control and can be shared or moved without being restricted by file boundaries.

Snippets can range in length from a few lines of code to hundreds or thousands. Thus, it might be anything that can be maintained as a single entity, such as a tiny portion of code that spans numerous source files or a large amount of code.

You have complete control over who may access and modify your Bitbucket snippets; they can be completely private, shared with a specific workspace, or shared publicly with everyone in your workspace.

The Snippets add-on allows you to easily embed code snippets into Confluence pages and blog posts. Paste any snippet URL into the editor and the snippet will automatically be embedded using the Snippet macro. The following snippet providers are currently supported:

Features

The following are the features:

  • Share your code snippets with other users.

  • Store your code snippets in Bitbucket Server.

  • Comment on snippets.

  • Secure snippets with fine-grained visibility and access controls.

  • Clone your snippet with a single click so you can work on it locally then push it back up to Bitbucket Cloud.

  • Star snippets to add to your own snippets collection.

  • Embed snippets on any website or in Confluence by using the Snippets for Confluence app.

More information

Download Compatibility

Report an issue

Explore our marketplace