Skip to content


Subversion checkout URL

You can clone with
Download ZIP
The ultimate snippet solution for python enabled Vim.
Python VimL
Latest commit 90dc0a2 @SirVer SirVer committed with Version 3.0
- Organisational changes: The project is now hosted on github. Snippets are
  now shipped separately - please track honza/vim-snippets.
- UltiSnips is now a drop in replacement for snipMate - it parses snipMate
  snippets and expands them emulating snipMates smaller feature set.
- Filetype tab completion for UltiSnipsEdit.
- UltiSnipsEdit now only edits private snippet files. Use UltiSnipsEdit! if
  you want to edit shipped files.
- New option 's' which strips trailing whitespace before jumping to next
- New option 'a' which converts non-ascii characters into ascii characters
  in transformations.
- New keyword in snippet files: priority defines which snippets should
  overwrite others. This deprecates the '!' option.
- Remove common whitespace of visual line selections before inserting in an
  indented tabstop.
- Support for overwriting the snippet directory name on a per buffer basis
  to support per project snippets. *UltiSnips-snippet-search-path*
- The keymaps for jumping in snippets are now only mapped when a snippet is
  active, allowing them to be used for something else otherwise.
- Expanding and jumping no longer overwrites the unnamed register.
- Integration with Valloric/YouCompleteMe and Shougo/neocomplete.vim.
- Other plugins can add sources for snippets to create snippets on the fly.
- Vim functions now indicates if it did any work.
- For python extensions: UltiSnips adds itself to the sys.path and can be
  easily imported if it is available. *UltiSnips-python-module-path*
- A new function giving programmatic access to the snippets currently
  available for expansion for other plugins integrating with UltiSnips.
- New or improved snippets (now in a different repo): all, bib, c, cpp, cs,
  d, django, eruby, go, haskell, html, html, htmljinja, java, javascript,
  js, ledger, ocaml, perl, php, puppet, python, ruby, scss, sh, tex, vim,
  xml, zsh.
Failed to load latest commit information.
after/plugin Version 3.0
autoload Version 3.0
doc Version 3.0
ftdetect Version 3.0
ftplugin Version 3.0
plugin Version 3.0
pythonx/UltiSnips Version 3.0
syntax Version 3.0
utils Version 3.0
.bzrignore Version 3.0
.gitignore Version 1.6
ChangeLog Version 3.0
README Version 3.0 Version 3.0
pylintrc Version 3.0 Version 3.0


UltiSnips is the ultimate solution for snippets in Vim. It has tons of features and is very fast.

GIF Demo

In this demo I am editing a python file. I first expand the #! snippet, then the class snippet. The completion menu comes from YouCompleteMe, UltiSnips also integrates with neocomplete. I can jump through placeholders and add text while the snippet inserts text in other places automatically: when I add Animal as a base class, __init__ gets updated to call the base class constructor. When I add arguments to the constructor, they automatically get assigned to instance variables. I then insert my personal snippet for print debugging. Note that I left insert mode, inserted another snippet and went back to add an additional argument to __init__ and the class snippet was still active and added another instance variable.

The official home of UltiSnips is at Please add pull requests and issues there.

Quick Start

This assumes you are using Vundle. Adapt for your plugin manager of choice. Put this into your .vimrc.

" Track the engine.
Bundle 'SirVer/ultisnips'

" Snippets are separated from the engine. Add this if you want them:
Bundle 'honza/vim-snippets'

" Trigger configuration. Do not use <tab> if you use
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"

" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"

UltiSnips comes with comprehensive documentation. As there are more options and tons of features I suggest you at least skim it.


From a gentle introduction to really advanced in a few minutes. The blog posts of the screencasts contain more advanced examples of the things discussed in the videos.

Something went wrong with that request. Please try again.