Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

If you're looking for the Snippets for Confluence documentation, it can be found here.

Snippets

...

Snippets for Bitbucket provides a simple way to create, store, and share code snippets in Bitbucket (DC and Server

...

). Create code snippets

...

, make them available to other users

...

, discover snippets created by other users, and add them to your starred snippets collection.

Info

If you're looking for the Snippets for Confluence documentation, it can be found here.

Feature Highlights

  • Store your code snippets in Bitbucket

...

  • Share your code snippets with other users

  • Discover snippets created by other users

  • Star snippets to add them to your own starred snippets collection

...

Screenshots

Image RemovedImage RemovedImage RemovedImage Removed

How it works

Access your snippets by using the snippets menu in the header of Bitbucket. You can create new snippets directly from the menu or by clicking the create button in the snippets overview. Specify a name and an optional description, which supports Markdown syntax. You can categorize your snippet by assigning one or more categories. Enter new categories separated by commas. You can also control the visibility and accessibility of your snippet:

...

Accessibility

...

Info

Note: If you want to prevent users from making their snippets accessible for external users they share the URL with, Bitbucket administrators can globally disable the option to make individual snippets public in the plugin configuration located under:

Bitbucket Administration > Add-ons > Snippets configuration

A snippet consists of one or more files. Add as many files as you want by clicking the add file button at the bottom of the form or by simply using drag & drop in modern browsers. The syntax highlighting of your snippet code is automatically detected by the ending of the file name.

Markdown files are being rendered directly when viewing a snippet, if the file name has one of the following extensions: .md, .markdown, .mdown, .mkdn or .mkd. Learn more about the supported syntax in the Markdown Syntax Guide.

After you have created your snippet, you can share it with other users by copying the snippet link displayed in the right sidebar of the snippet. Once other users know the URL of your snippet, they can share it as well, add a comment or star it for later use. By starring a snippet, the snippet will be available in your own starred snippets collection. You can also download a snippet with all files as a zip file or view the raw file directly in your browser.

It's even possible to embed a snippet on an external website, on Confluence pages and blogposts by using our free Snippets add-on for Confluence or on a page published in Bitbucket with our Pages add-on by simply using the embed code displayed in the right sidebar of the snippet. And if you only want to embed a single file of the snippet, just add the filename with the file parameter ?file={filename} to the url used in the embed code. Permissions are always inherited from the snippet itself. If you want to embed a snippet on a public website, you need to make the snippet accessible for external users first. Otherwise only logged-in Bitbucket Server users will be able to view the embedded snippet.

...

Go to Snippets for Bitbucket in Atlassian Marketplace and click Try it free to begin a new trial or Buy now to purchase a license!

Proceed to the System Requirements to learn more about what you need to install this app.