IDE and terminal snippets
What is UltiSnips? An introduction to SirVer's snippet plugin for Vim and Neovim
UltiSnips is a snippet solution for Vim and Neovim. It expands short triggers into larger pieces of text, lets you jump through placeholders, and updates related text elsewhere in the snippet as you type. The vendor describes it as feature-rich and fast.
- Tool
- UltiSnips
- Made by
- SirVer
- Official site
- github.com/SirVer/ultisnips
- Category
- IDE and terminal snippets
Who makes UltiSnips
UltiSnips is made by SirVer, who started the project in June 2009. SirVer has maintained it again since June 2019.
The official website is the GitHub repository, linked below. Issues and pull requests are accepted there.
Official website: github.com/SirVer/ultisnips
What UltiSnips is for
UltiSnips is for inserting and filling in snippets inside Vim and Neovim. You type a trigger, expand it, and move between placeholders. While you edit one placeholder, the snippet updates text elsewhere automatically, so repeated or derived values stay consistent without manual retyping.
Snippets can also make use of selected text, so a snippet can wrap or reuse something you have already highlighted in the buffer. Python interpolation inside snippets is a documented feature, which allows snippet content to be computed rather than only typed.
Who UltiSnips is for
The vendor states the audience as Vim users and Neovim users. It suits people who already work in one of these editors and want snippet handling inside it rather than in a separate application.
Because the engine ships with comprehensive documentation and screencast blog posts cover advanced usage examples, there are written and recorded references for both getting started and going deeper.
Notable capabilities
UltiSnips combines a snippet engine with hooks for completion tooling and a few editor-specific conveniences. The capabilities below come from the project's documented features.
- Placeholder jumping, with the snippet updating text elsewhere automatically as you edit.
- Integration with completion plugins such as YouCompleteMe, deoplete and vim-easycomplete.
- Python interpolation in snippets, documented as a feature.
- Snippets that can use selected text.
- A snippet collection kept separate from the engine, so vim-snippets can be added.
- An option that makes :UltiSnipsEdit split the window.
- Comprehensive documentation shipped with the plugin.
- Screencast blog posts covering advanced usage examples.
How UltiSnips fits IDE and terminal snippets
Within the category of IDE and terminal snippets, UltiSnips sits on the editor side. It runs inside Vim and Neovim, which many developers use in terminals, and it handles snippets at the point of typing code.
In Snipspire's wider niche of snippet managers, code paste and developer snippet tools, it is an in-editor expansion engine. It is not a place for storing or sharing snippets with other people. The separation between engine and snippet collection reflects this: the engine does the expanding, and you choose which snippets to load, for example by adding vim-snippets.
When pairing it with certain completion plugins, the default expand trigger may need changing. That is worth checking when setting up integration with a tool such as YouCompleteMe, deoplete or vim-easycomplete.
Frequently asked questions
What is UltiSnips used for?
UltiSnips is used to expand snippets in Vim and Neovim. It lets you jump through placeholders while the snippet updates text elsewhere automatically.
Who develops UltiSnips?
SirVer started UltiSnips in June 2009 and has maintained it again since June 2019. The official repository is on GitHub, where issues and pull requests are accepted.
Does UltiSnips work with completion plugins?
Yes. It integrates with completion plugins such as YouCompleteMe, deoplete and vim-easycomplete. The default expand trigger may need changing with certain completion plugins.
Does UltiSnips include a snippet collection?
The snippet collection is separate from the engine. You can add vim-snippets to get a collection.
Does UltiSnips support Python in snippets?
Yes. Python interpolation in snippets is a documented feature.
Snipspire is independent and is not affiliated with SirVer. Product names belong to their owners. Features change; confirm details on the official website.