1- IMPORTANT: comment on: [ What about merging whith Ultisnip using its engine] ( https://github.com/garbas/vim-snipmate/issues/114 )
2-
31Snipmate & UltiSnip Snippets
42============================
53
@@ -9,50 +7,93 @@ It is community-maintained and many people have contributed snippet files and
97other improvements already.
108
119Contents
12- ========
10+ --------
1311
14- snippets/*: snippets using snipmate format
15- UltiSnips/*: snippets using UltiSnips format
12+ - ` snippets/* ` : snippets using snipmate format
13+ - ` UltiSnips/* ` : snippets using UltiSnips format
1614
17- Snippet engines
18- ===============
15+ Snippet engines supporting vim-snippets
16+ ----------------------------------------
1917
2018There are different forks of snippet engines which allow the user to insert
21- sippets by typing the name of a snippet hitting the expansion mapping.
19+ snippets by typing the name of a snippet hitting the expansion mapping.
20+
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.
2243
23- garbas/vim-snipmate [4]:
24- VimL, snipmate-snippets, engine sometimes behaves strange, supports
25- rewriting snippets on the fly (eg adding a second version with folding
26- markers)
44+ If you have VimL only (vim without python support) your best option is using
45+ [ garbas/vim-snipmate] ( https://github.com/garbas/vim-snipmate ) and cope with the
46+ minor bugs found in the engine.
2747
28- MarcWeber/UltiSnips [6]:
29- python, snipmate-snippets and UltiSnips-snippets
3048
31- SirVer/ultisnips [7]:
32- python, UltiSnips-snippets
49+ Q: Should "snipmate be deprecated in favour of UltiSnips"?
3350
34- github.com/Shougo/neosnippet [5]:
35- viml, has a compatible mode allowing to reuse most snipmate snippets ?
51+ A: No, because snimpate is VimL, and UltiSnips requires Python.
52+ Some people want to use snippets without having to install Vim with Python
53+ support. Yes - this sucks.
3654
37- XPTemplate:
38- totally different syntax, does not read snippets contained in this file,
39- but it is also very powerful
55+ One solution would be: Use snippets if they are good enough, but allow overriding them
56+ in UltiSnips. This would avoid most duplication while still serving most users.
57+ AFAIK there is a nested-placeholder branch for snipmate too. snipmate is still
58+ improved by Adnan Zafar. So maybe time is not ready to make a final decision yet.
4059
41- ... there are some more, but they have less features which is why I don't
42- mention them here
60+ [ github issue/discussion] ( https://github.com/honza/vim-snippets/issues/363 )
4361
44- UltiSnips engine has additional features such as "nested snippets".
62+ Installation
63+ ------------
4564
46- Which one to use? If you have python give MarcWeber/UltiSnips a try because its
47- fast and supports all important features. You can prefer the UltiSnip versions
48- of the snippets by setting the "always_use_first_snippet" option to 1.
65+ First be aware that there are many options, see "Snippet engines" above.
66+ Second be aware than there are [ tons of plugin managers] ( http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html )
67+ which is why Marc Weber thinks that it doesn't make sense to repeat the same
68+ repetitive information everywhere.
4969
50- If you have VimL only (vim without python support) your best option is using
51- garbas/vim-snipmate and cope with the minor bugs found in the engine.
70+ * Recommended way:*
71+ [ vim-addon-manager] ( vim-addon-manager ) (because Marc Weber wrote it for exactly
72+ this reason, it supports simple dependency management). Eg you're done by this
73+ line in your .vimrc:
74+
75+ ```
76+ " assuming you want to use snipmate snippet engine
77+ ActivateAddons vim-snippets snipmate
78+ ```
79+
80+ [ vim-pi] ( https://bitbucket.org/vimcommunity/vim-pi/issue/90/we-really-need-a-web-interface )
81+ Is the place to discuss plugin managers and repository resources.
82+
83+ About how to install snipate see [ snipmate@garbas] ( https://github.com/garbas/vim-snipmate )
5284
85+ (Bundle, Pathogen, git clone - keywords to make people find this link by ctrl-f search)
86+ I know that I should be reading the docs of the snippet engine, just let me copy paste into my .vimrc:
87+ [ See this pull request] ( https://github.com/honza/vim-snippets/pull/307/files ) .
88+
89+ TROUBLE
90+ =======
91+ If you still have trouble getting this to work create a github ticket, ask on
92+ irc or the mailinglist.
5393
5494Policies / for contributors
55- ===========================
95+ ---------------------------
96+
5697Some snippets are useful for almost all languages, so let's try to have the same
5798triggers for them:
5899
@@ -64,11 +105,7 @@ el : else ..
64105wh : while (cond) ...
65106```
66107
67- If you're not satisfied with these defaults, open a ticket that we implement
68- aliasing. Then you can remap "else" to "el" or the like.
69-
70-
71- Don't add stupid placeholder default texts like
108+ Don't add useless placeholder default texts like
72109```
73110if (${1:condition}){
74111 ${2:some code here}
@@ -93,9 +130,16 @@ What about one line if ee then .. else .. vs if \n .. then \n ... \n else \n ..
93130Which additional policies to add?
94131Discuss at: https://github.com/honza/vim-snippets/issues/230
95132
133+ * folding markers* :
134+ Until further work is done on ` vim-snipmate ` , please don't add folding markers
135+ into snippets. ` vim-snipmate ` has some comments about how to patch all snippets
136+ on the fly adding those.
137+
138+ Currently all snippets from UltiSnips have been put into UltiSnips - some work
139+ on merging should be done (dropping duplicates etc). Also see engines section above.
96140
97141Related repositories
98- ====================
142+ --------------------
99143We also encourage people to maintain sets of snippets for particular use cases
100144so that all users can benefit from them. People can list their snippet repositories here:
101145
@@ -106,15 +150,15 @@ so that all users can benefit from them. People can list their snippet reposito
106150
107151Installation using VAM: "github: rbonvall /snipmate-snippets-bib"
108152
109-
110153Future - ideas - examples
111- =========================
154+ -------------------------
155+
112156[ overview snippet engines] ( http://vim-wiki.mawercer.de/wiki/topic/text-snippets-skeletons-templates.html )
113157If you have ideas you can add them to that list of "snippet engine features by example".
114158
115159
116160Historical notes
117- ================
161+ ----------------
118162
119163[ vim-snipmate] [ 1 ] was originally started by [ Michael Sanders] [ 2 ] who has now
120164unfortunately abandoned the project. [ Rok Garbas] [ 3 ] is now maintaining a
@@ -138,17 +182,6 @@ let g:snipMate.scope_aliases = {}
138182let g:snipMate.scope_aliases['ruby'] = 'ruby,ruby-rails,ruby-1.9'
139183```
140184
141- or github.com/MarcWeber/UltiSnips this way:
142-
143-
144- ``` vim
145- let g:UltiSnips = {}
146-
147- let g:UltiSnips.snipmate_ft_filter = {
148- \ 'default' : {'filetypes': ["FILETYPE"] },
149- \ 'ruby' : {'filetypes': ["ruby", "ruby-rails", "ruby-1.9"] },
150- ```
151-
152185If it happens that you work on a project requiring ruby-1.8 snippets instead,
153186consider using vim-addon-local-vimrc and override the filetypes.
154187
@@ -160,16 +193,15 @@ ruby-library-version triplet. Sometimes postfixing a name such as
160193
161194will do it then if syntax has changed.
162195
196+
163197Language maintainers
164198--------------------
165199
166200No one can really be proficient in all programming languages. If you would like
167201to maintain snippets for a language, please get in touch.
168202
169- Notes: People are interested in snippets - and their interest may stop again
170- at will. So its ok if people maintain a language only for a short period of
171- time - or jump in and get things done - don't let the flow stop :)
172- vim-snippets is not like the "linux kernel".
203+ Notes: People are interested in snippets - and their interest may wane again.
204+ This list is kept up-to-date on a best effort basis.
173205
174206* Python - [ honza] ( http://github.com/honza )
175207* Javascript - [ honza] ( http://github.com/honza )
@@ -181,25 +213,6 @@ vim-snippets is not like the "linux kernel".
181213* Falcon - [ steveno] ( https://github.com/steveno )
182214* Elixir - [ iurifq] ( https://github.com/iurifq )
183215
184- Contributing notes
185- ------------------
186-
187- Until further work is done on ` vim-snipmate ` , please don't add folding markers
188- into snippets. ` vim-snipmate ` has some comments about how to patch all snippets
189- on the fly adding those.
190-
191- Because MarcWeber/UltiSnips [ 6] supports also snipmate-snippets there is no
192- need to duplicate all snippets - only those snippets who use advanced UltiSnips
193- features should be duplicated in UltiSnips (?)
194-
195- Currently all snippets from UltiSnips have been put into UltiSnips - some work
196- on merging should be done (dropping duplicates etc)
197-
198- Authors
199- -------
200-
201- For a list of authors, please see the ` AUTHORS ` files.
202-
203216License
204217-------
205218
@@ -211,6 +224,4 @@ terms of the MIT license.
211224[ 2 ] : http://github.com/msanders
212225[ 3 ] : http://github.com/garbas
213226[ 4 ] : http://github.com/garbas/vim-snipmate
214- [ 5 ] : http://github.com/Shougo/neosnippet
215- [ 6 ] : http://github.com/MarcWeber/UltiSnips
216227[ 7 ] : http://github.com/SirVer/ultisnips
0 commit comments