~ubuntu-branches/ubuntu/vivid/vim-ultisnips/vivid

« back to all changes in this revision

Viewing changes to README.md

  • Committer: Package Import Robot
  • Author(s): Michael Fladischer
  • Date: 2014-10-12 18:11:54 UTC
  • Revision ID: package-import@ubuntu.com-20141012181154-1jeoj467dh2l5f2e
Tags: upstream-3.0
ImportĀ upstreamĀ versionĀ 3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
UltiSnips
 
2
=========
 
3
 
 
4
UltiSnips is the ultimate solution for snippets in Vim. It has tons of features
 
5
and is very fast.
 
6
 
 
7
![GIF Demo](https://raw.github.com/SirVer/ultisnips/master/doc/demo.gif)
 
8
 
 
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
 
20
variable.
 
21
 
 
22
The official home of UltiSnips is at <https://github.com/sirver/ultisnips>.
 
23
Please add pull requests and issues there.
 
24
 
 
25
Quick Start
 
26
-----------
 
27
 
 
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`.
 
30
 
 
31
    " Track the engine.
 
32
    Bundle 'SirVer/ultisnips'
 
33
 
 
34
    " Snippets are separated from the engine. Add this if you want them:
 
35
    Bundle 'honza/vim-snippets'
 
36
 
 
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>"
 
41
 
 
42
    " If you want :UltiSnipsEdit to split your window.
 
43
    let g:UltiSnipsEditSplit="vertical"
 
44
 
 
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.
 
48
 
 
49
Screencasts
 
50
-----------
 
51
 
 
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.
 
55
 
 
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/)
 
60