1
- IMPORTANT: comment on: [ What about merging with Ultisnip using its engine] ( https://github.com/garbas/vim-snipmate/issues/114 )
2
-
3
1
Snipmate & UltiSnip Snippets
4
2
============================
5
3
@@ -9,51 +7,48 @@ It is community-maintained and many people have contributed snippet files and
9
7
other improvements already.
10
8
11
9
Contents
12
- ========
10
+ --------
13
11
14
- snippets/*: snippets using snipmate format
15
- UltiSnips/*: snippets using UltiSnips format
12
+ - ` snippets/* ` : snippets using snipmate format
13
+ - ` UltiSnips/* ` : snippets using UltiSnips format
16
14
17
15
Snippet engines supporting vim-snippets
18
- ========================================
16
+ ----------------------------------------
19
17
20
18
There are different forks of snippet engines which allow the user to insert
21
19
snippets by typing the name of a snippet hitting the expansion mapping.
22
20
23
- github.com/garbas/vim-snipmate:
24
- VimL, snipmate-snippets, engine sometimes behaves strange, supports
25
- rewriting snippets on the fly (eg adding a second version with folding
26
- markers)
27
-
28
- github.com/MarcWeber/UltiSnips:
29
- python, snipmate-snippets and UltiSnips-snippets
30
-
31
- github.com/SirVer/ultisnips:
32
- python, UltiSnips-snippets
33
-
34
- github.com/Shougo/neosnippet:
35
- viml, has a compatible mode allowing to reuse most snipmate snippets ?
36
-
37
- github.com/drmingdrmer/xptemplate:
38
- Totally different syntax, does not read snippets contained in this file,
39
- but it is also very powerful. It does not support vim-snippets (just
40
- listing it here for completness)
41
-
42
- This tries to be a more comprehensive list (which still is incomplete)
43
- http://vim-wiki.mawercer.de/wiki/topic/text-snippets-skeletons-templates.html
44
-
45
- UltiSnips engine has additional features such as "nested snippets".
46
-
47
- Which one to use? If you have python give MarcWeber/UltiSnips a try because its
48
- fast and supports all important features. You can prefer the UltiSnip versions
49
- of the snippets by setting the "always_use_first_snippet" option to 1.
21
+ - [ github.com/SirVer/ultisnips] ( https://github.com/SirVer/ultisnips ) :
22
+ python, supports all snippets in this repo.
23
+ - [ github.com/garbas/vim-snipmate] ( https://github.com/garbas/vim-snipmate ) :
24
+ VimL, snipmate-snippets, engine sometimes behaves strange. Supports
25
+ snippets/*
26
+ - [ github.com/Shougo/neosnippet] ( https://github.com/Shougo/neosnippet.vim ) :
27
+ VimL, supports snippets/* with some configuration.
28
+ - [ github.com/drmingdrmer/xptemplate] ( https://github.com/drmingdrmer/xptemplate ) :
29
+ Totally different syntax, does not read snippets contained in this file, but
30
+ it is also very powerful. It does not support vim-snippets (just listing it
31
+ here for completness)
32
+
33
+ There tries to be a more comprehensive list (which still is incomplete) here:
34
+ http://vim-wiki.mawercer.de/wiki/topic/text-snippets-skeletons-templates.html
35
+
36
+ UltiSnips has additional features such as high speed, nesting snippets,
37
+ expanding snippets in snippets and offers powerful transformations on text in
38
+ snippets (like visual selections or placeholder texts).
39
+
40
+ Which one to use? If you have python give
41
+ [ SirVer/ultisnips] ( https://github.com/SirVer/ultisnips ) a try because its fast
42
+ and has the most features.
50
43
51
44
If you have VimL only (vim without python support) your best option is using
52
- garbas/vim-snipmate and cope with the minor bugs found in the engine.
45
+ [ garbas/vim-snipmate] ( https://github.com/garbas/vim-snipmate ) and cope with the
46
+ minor bugs found in the engine.
53
47
54
48
55
49
Installation
56
- ============
50
+ ------------
51
+
57
52
First be aware that there are many options, see "Snippet engines" above.
58
53
Second be aware than there are [ tons of plugin managers] ( http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html )
59
54
which is why Marc Weber thinks that it doesn't make sense to repeat the same
@@ -84,7 +79,8 @@ If you still have trouble getting this to work create a github ticket, ask on
84
79
irc or the mailinglist.
85
80
86
81
Policies / for contributors
87
- ===========================
82
+ ---------------------------
83
+
88
84
Some snippets are useful for almost all languages, so let's try to have the same
89
85
triggers for them:
90
86
@@ -96,11 +92,7 @@ el : else ..
96
92
wh : while (cond) ...
97
93
```
98
94
99
- If you're not satisfied with these defaults, open a ticket that we implement
100
- aliasing. Then you can remap "else" to "el" or the like.
101
-
102
-
103
- Don't add stupid placeholder default texts like
95
+ Don't add useless placeholder default texts like
104
96
```
105
97
if (${1:condition}){
106
98
${2:some code here}
@@ -127,7 +119,7 @@ Discuss at: https://github.com/honza/vim-snippets/issues/230
127
119
128
120
129
121
Related repositories
130
- ====================
122
+ --------------------
131
123
We also encourage people to maintain sets of snippets for particular use cases
132
124
so that all users can benefit from them. People can list their snippet repositories here:
133
125
@@ -138,15 +130,15 @@ so that all users can benefit from them. People can list their snippet reposito
138
130
139
131
Installation using VAM: "github: rbonvall /snipmate-snippets-bib"
140
132
141
-
142
133
Future - ideas - examples
143
- =========================
134
+ -------------------------
135
+
144
136
[ overview snippet engines] ( http://vim-wiki.mawercer.de/wiki/topic/text-snippets-skeletons-templates.html )
145
137
If you have ideas you can add them to that list of "snippet engine features by example".
146
138
147
139
148
140
Historical notes
149
- ================
141
+ ----------------
150
142
151
143
[ vim-snipmate] [ 1 ] was originally started by [ Michael Sanders] [ 2 ] who has now
152
144
unfortunately abandoned the project. [ Rok Garbas] [ 3 ] is now maintaining a
@@ -170,14 +162,6 @@ let g:snipMate.scope_aliases = {}
170
162
let g:snipMate.scope_aliases['ruby'] = 'ruby,ruby-rails,ruby-1.9'
171
163
```
172
164
173
- or github.com/MarcWeber/UltiSnips this way:
174
-
175
-
176
- ``` vim
177
- let g:UltiSnips = {}
178
-
179
- let g:UltiSnips.snipmate_ft_filter = {
180
- \ 'default' : {'filetypes': ["FILETYPE"] },
181
165
\ 'ruby' : {'filetypes': ["ruby", "ruby-rails", "ruby-1.9"] },
182
166
```
183
167
@@ -192,16 +176,15 @@ ruby-library-version triplet. Sometimes postfixing a name such as
192
176
193
177
will do it then if syntax has changed.
194
178
179
+
195
180
Language maintainers
196
181
--------------------
197
182
198
183
No one can really be proficient in all programming languages. If you would like
199
184
to maintain snippets for a language, please get in touch.
200
185
201
- Notes: People are interested in snippets - and their interest may stop again
202
- at will. So its ok if people maintain a language only for a short period of
203
- time - or jump in and get things done - don't let the flow stop :)
204
- vim-snippets is not like the "linux kernel".
186
+ Notes: People are interested in snippets - and their interest may wane again.
187
+ This list is kept up-to-date on a best effort basis.
205
188
206
189
* Python - [honza](http://github.com/honza)
207
190
* Javascript - [honza](http://github.com/honza)
@@ -220,18 +203,13 @@ Until further work is done on `vim-snipmate`, please don't add folding markers
220
203
into snippets. `vim-snipmate` has some comments about how to patch all snippets
221
204
on the fly adding those.
222
205
223
- Because MarcWeber/ UltiSnips [ 6 ] supports also snipmate-snippets there is no
224
- need to duplicate all snippets - only those snippets who use advanced UltiSnips
225
- features should be duplicated in UltiSnips (?)
206
+ Because UltiSnips reads snipmate-snippets too there is no need to duplicate all
207
+ snippets - only those snippets who use advanced UltiSnips features should be
208
+ duplicated in UltiSnips.
226
209
227
210
Currently all snippets from UltiSnips have been put into UltiSnips - some work
228
211
on merging should be done (dropping duplicates etc)
229
212
230
- Authors
231
- -------
232
-
233
- For a list of authors, please see the ` AUTHORS ` files.
234
-
235
213
License
236
214
-------
237
215
@@ -243,5 +221,4 @@ terms of the MIT license.
243
221
[2]: http://github.com/msanders
244
222
[3]: http://github.com/garbas
245
223
[4]: http://github.com/garbas/vim-snipmate
246
- [ 6 ] : http://github.com/MarcWeber/UltiSnips
247
224
[7]: http://github.com/SirVer/ultisnips
0 commit comments