4
UltiSnips is the ultimate solution for snippets in Vim. It has tons of features
7
![GIF Demo](https://raw.github.com/SirVer/ultisnips/master/doc/demo.gif)
9
In this demo I am editing a python file. I first expand the `#!` snippet, then
10
the `class` snippet. The completion menu comes from
11
[YouCompleteMe](https://github.com/Valloric/YouCompleteMe), UltiSnips also
12
integrates with [neocomplete](https://github.com/Shougo/neocomplete.vim). I can
13
jump through placeholders and add text while the snippet inserts text in other
14
places automatically: when I add `Animal` as a base class, `__init__` gets
15
updated to call the base class constructor. When I add arguments to the
16
constructor, they automatically get assigned to instance variables. I then
17
insert my personal snippet for `print` debugging. Note that I left insert mode,
18
inserted another snippet and went back to add an additional argument to
19
`__init__` and the class snippet was still active and added another instance
22
The official home of UltiSnips is at <https://github.com/sirver/ultisnips>.
23
Please add pull requests and issues there.
28
This assumes you are using [Vundle](https://github.com/gmarik/Vundle.vim). Adapt
29
for your plugin manager of choice. Put this into your `.vimrc`.
32
Bundle 'SirVer/ultisnips'
34
" Snippets are separated from the engine. Add this if you want them:
35
Bundle 'honza/vim-snippets'
37
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
38
let g:UltiSnipsExpandTrigger="<tab>"
39
let g:UltiSnipsJumpForwardTrigger="<c-b>"
40
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
42
" If you want :UltiSnipsEdit to split your window.
43
let g:UltiSnipsEditSplit="vertical"
45
UltiSnips comes with comprehensive
46
[documentation](https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt).
47
As there are more options and tons of features I suggest you at least skim it.
52
From a gentle introduction to really advanced in a few minutes. The blog posts
53
of the screencasts contain more advanced examples of the things
54
discussed in the videos.
56
- [Episode 1: What are snippets and do I need them?](http://www.sirver.net/blog/2011/12/30/first-episode-of-ultisnips-screencast/)
57
- [Episode 2: Creating Basic Snippets](http://www.sirver.net/blog/2012/01/08/second-episode-of-ultisnips-screencast/)
58
- [Episode 3: What's new in version 2.0](http://www.sirver.net/blog/2012/02/05/third-episode-of-ultisnips-screencast/)
59
- [Episode 4: Python Interpolation](http://www.sirver.net/blog/2012/03/31/fourth-episode-of-ultisnips-screencast/)