I am brand new to the realm of snippets in vi[m] and have been doing a little reading here, on Fandom, and the repos on github. I notice that vim-snippets has been mentioned a few times in terms of being the "go to" source, at least for the snipmate family.

Along the way, I happened to run across a mention of Bitbucket Snippets. I was wondering how popular that was in terms of maintaining a personal or team repo, and whether any of the popular plugins has or is planning on integrating with it (or, conversely, has a firm reason against doing so). My thinking is that there would be a fairly large demand for being able to curate more-or-less proprietary (or idiosyncratic anyway) collections of snippets.

  • Most snippets plugins allow you to create your own... should be a simple matter of git clone or equivalent for a central repository... however, bitbucket snippets seems a different thing (more like team-shareable gists, if you’re familiar with github).
    – D. Ben Knoble
    Commented May 7, 2020 at 0:20

1 Answer 1


I think you're mixing up two different and not directly related kinds of snippets here...

Vim snippets are templates you can use while editing text and are meant to help you fill up a lot of the boilerplate you need in many programming languages. For instance, you can use snippets to quickly insert skeletons of classes or functions, a template for a main function, setters and getters for attributes, or even blocks for if, while, switch statements for languages.

Vim snippets typically allow (or even require) customization when used, either through fields that are filled in (such as function or class name to use when creating a function or class through a snippet, or a variable to use and upper limit when creating a for loop), or by being put inside a code block after expanding the snippet.

Bitbucket snippets, on the other hand, are simply a somewhat unstructured repository for sharing contents, logs, pastes or media files with others (or saving them for later.) Bitbucket happens to be using a git repository to implement storage and versioning for those snippets.

That's very similar to GitHub's Gists.

It also fills a similar role to many Paste Bin services you'll find online.

You could use Bitbucket Snippets to store Vim snippets, but Vim snippet managers typically want something more structured, like an actual git repository, so using a real repository (such as honza/vim-snippets) is usually more appropriate than less structured forms.

If what you're after is a Vim plug-in to help you manage, publish and fetch to paste bin types of services, you'll likely find many of those too. For example, consider mattn/vim-gist to integrate with GitHub's Gists (which, as mentioned above, seem to be very similar to what Bitbucket implemented on their Snippets.)

  • 1
    Thanks for your insight. Looks like I will have to wade into this more deeply to clarify my understanding and ultimate objectives....
    – Jeff
    Commented May 12, 2020 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.