Skip to content

Commit ade416e

Browse files
committed
merged with upstream changes. and forked this to my own repos Conflicts: UltiSnips/c.snippets UltiSnips/cpp.snippets
2 parents 86e9ab2 + 1745f24 commit ade416e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3588
-961
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pyc

README.md

Lines changed: 52 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Snipmate & UltiSnip Snippets
1+
snipMate & UltiSnip Snippets
22
============================
33

44
This repository contains snippets files for various programming languages.
@@ -9,7 +9,7 @@ other improvements already.
99
Contents
1010
--------
1111

12-
- `snippets/*`: snippets using snipmate format
12+
- `snippets/*`: snippets using snipMate format
1313
- `UltiSnips/*`: snippets using UltiSnips format
1414

1515
Snippet engines supporting vim-snippets
@@ -28,8 +28,8 @@ snippets by typing the name of a snippet hitting the expansion mapping.
2828
- [github.com/drmingdrmer/xptemplate](https://github.com/drmingdrmer/xptemplate):
2929
Totally different syntax, does not read snippets contained in this file, but
3030
it is also very powerful. It does not support vim-snippets (just listing it
31-
here for completness)
32-
31+
here for completeness)
32+
3333
There tries to be a more comprehensive list (which still is incomplete) here:
3434
http://vim-wiki.mawercer.de/wiki/topic/text-snippets-skeletons-templates.html
3535

@@ -45,6 +45,18 @@ If you have VimL only (vim without python support) your best option is using
4545
[garbas/vim-snipmate](https://github.com/garbas/vim-snipmate) and cope with the
4646
minor bugs found in the engine.
4747

48+
Q: Should "snipMate be deprecated in favour of UltiSnips"?
49+
50+
A: No, because snipMate is VimL, and UltiSnips requires Python.
51+
Some people want to use snippets without having to install Vim with Python
52+
support. Yes - this sucks.
53+
54+
One solution would be: Use snippets if they are good enough, but allow overriding them
55+
in UltiSnips. This would avoid most duplication while still serving most users.
56+
AFAIK there is a nested-placeholder branch for snipMate too. snipMate is still
57+
improved by Adnan Zafar. So maybe time is not ready to make a final decision yet.
58+
59+
[github issue/discussion](https://github.com/honza/vim-snippets/issues/363)
4860

4961
Installation
5062
------------
@@ -55,28 +67,29 @@ which is why Marc Weber thinks that it doesn't make sense to repeat the same
5567
repetitive information everywhere.
5668

5769
*Recommended way:*
58-
[vim-addon-manager](vim-addon-manager) (because Marc Weber wrote it for exactly
59-
this reason, it supports simple dependency management). Eg you're done by this
60-
line in your .vimrc:
70+
[vim-addon-manager](https://github.com/MarcWeber/vim-addon-manager) (because Marc Weber wrote it for exactly
71+
this reason, it supports simple dependency management). E.g. you're done by this
72+
line in your `.vimrc`:
6173

62-
```
74+
```vim
6375
" assuming you want to use snipmate snippet engine
6476
ActivateAddons vim-snippets snipmate
6577
```
6678

6779
[vim-pi](https://bitbucket.org/vimcommunity/vim-pi/issue/90/we-really-need-a-web-interface)
6880
Is the place to discuss plugin managers and repository resources.
6981

70-
About how to install snipate see [snipmate@garbas](https://github.com/garbas/vim-snipmate)
82+
About how to install snipMate see [snipmate@garbas](https://github.com/garbas/vim-snipmate)
7183

7284
(Bundle, Pathogen, git clone - keywords to make people find this link by ctrl-f search)
73-
I know that I should be reading the docs of the snippet engine, just let me copy paste into my .vmirc:
74-
(See this pull request)[https://github.com/honza/vim-snippets/pull/307/files].
85+
I know that I should be reading the docs of the snippet engine, just let me copy paste into my `.vimrc`:
86+
[See this pull request](https://github.com/honza/vim-snippets/pull/307/files).
7587

7688
TROUBLE
7789
=======
78-
If you still have trouble getting this to work create a github ticket, ask on
79-
irc or the mailinglist.
90+
91+
If you still have trouble getting this to work create a GitHub ticket, ask on
92+
IRC or the mailing list.
8093

8194
Policies / for contributors
8295
---------------------------
@@ -92,7 +105,8 @@ el : else ..
92105
wh : while (cond) ...
93106
```
94107

95-
Don't add useless placeholder default texts like
108+
Don't add useless placeholder default texts like:
109+
96110
```
97111
if (${1:condition}){
98112
${2:some code here}
@@ -106,7 +120,7 @@ if (${1}){
106120
}
107121
```
108122

109-
Exception: Functions which are used less often, such as Vim's matchall(), matchstr()
123+
Exception: Functions which are used less often, such as Vim's `matchall()`, `matchstr()`
110124
functions which case hints may be helpful to remember order. In the VimL case
111125
get vim-dev plugin which has function completion
112126

@@ -117,26 +131,33 @@ What about one line if ee then .. else .. vs if \n .. then \n ... \n else \n ..
117131
Which additional policies to add?
118132
Discuss at: https://github.com/honza/vim-snippets/issues/230
119133

134+
*folding markers*:
135+
Until further work is done on `vim-snipmate`, please don't add folding markers
136+
into snippets. `vim-snipmate` has some comments about how to patch all snippets
137+
on the fly adding those.
138+
139+
Currently all snippets from UltiSnips have been put into UltiSnips - some work
140+
on merging should be done (dropping duplicates etc). Also see engines section above.
120141

121142
Related repositories
122143
--------------------
144+
123145
We also encourage people to maintain sets of snippets for particular use cases
124146
so that all users can benefit from them. People can list their snippet repositories here:
125147

126-
* https://github.com/rbonvall/snipmate-snippets-bib (snippets for BibTeX files)
127-
* https://github.com/sudar/vim-arduino-snippets (snippets for Arduino files)
128-
* https://github.com/zedr/zope-snipmate-bundle.git (snippets for Python, TAL and ZCML)
129-
* https://github.com/bonsaiben/bootstrap-snippets (snippets for Twitter Bootstrap markup, in HTML and Haml)
148+
* https://github.com/rbonvall/snipmate-snippets-bib (snippets for BibTeX files)
149+
* https://github.com/sudar/vim-arduino-snippets (snippets for Arduino files)
150+
* https://github.com/zedr/zope-snipmate-bundle.git (snippets for Python, TAL and ZCML)
151+
* https://github.com/bonsaiben/bootstrap-snippets (snippets for Twitter Bootstrap markup, in HTML and Haml)
130152

131-
Installation using VAM: "github:rbonvall/snipmate-snippets-bib"
153+
Installation using VAM: https://github.com/MarcWeber/vim-addon-manager
132154

133155
Future - ideas - examples
134156
-------------------------
135157

136158
[overview snippet engines](http://vim-wiki.mawercer.de/wiki/topic/text-snippets-skeletons-templates.html)
137159
If you have ideas you can add them to that list of "snippet engine features by example".
138160

139-
140161
Historical notes
141162
----------------
142163

@@ -146,15 +167,15 @@ unfortunately abandoned the project. [Rok Garbas][3] is now maintaining a
146167

147168
Versions / dialects / ..
148169
========================
170+
149171
There are some issues, such as newer language versions may require other
150172
snippets than older. If this exists we currently recommend doing this:
151173

152-
add snippets/ruby.snippets (common snippets)
153-
add snippets/ruby-1.8.snippets (1.8 only)
154-
add snippets/ruby-1.9.snippets (1.9 only)
155-
156-
then configure github.com/garbas/vim-snipmate this way:
174+
* add snippets/ruby.snippets (common snippets)
175+
* add snippets/ruby-1.8.snippets (1.8 only)
176+
* add snippets/ruby-1.9.snippets (1.9 only)
157177

178+
then configure https://github.com/garbas/vim-snipmate this way:
158179

159180
```vim
160181
let g:snipMate = {}
@@ -163,17 +184,18 @@ let g:snipMate.scope_aliases['ruby'] = 'ruby,ruby-rails,ruby-1.9'
163184
```
164185

165186
If it happens that you work on a project requiring ruby-1.8 snippets instead,
166-
consider using vim-addon-local-vimrc and override the filetypes.
187+
consider using `vim-addon-local-vimrc` and override the filetypes.
167188

168189
Well - of course it may not make sense to create a new file for each
169190
ruby-library-version triplet. Sometimes postfixing a name such as
170191

171-
migrate_lib_20_down
172-
migrate_lib_20_up
192+
```
193+
migrate_lib_20_down
194+
migrate_lib_20_up
195+
```
173196

174197
will do it then if syntax has changed.
175198

176-
177199
Language maintainers
178200
--------------------
179201

@@ -193,27 +215,12 @@ This list is kept up-to-date on a best effort basis.
193215
* Falcon - [steveno](https://github.com/steveno)
194216
* Elixir - [iurifq](https://github.com/iurifq)
195217

196-
Contributing notes
197-
------------------
198-
199-
Until further work is done on `vim-snipmate`, please don't add folding markers
200-
into snippets. `vim-snipmate` has some comments about how to patch all snippets
201-
on the fly adding those.
202-
203-
Because UltiSnips reads snipmate-snippets too there is no need to duplicate all
204-
snippets - only those snippets who use advanced UltiSnips features should be
205-
duplicated in UltiSnips.
206-
207-
Currently all snippets from UltiSnips have been put into UltiSnips - some work
208-
on merging should be done (dropping duplicates etc)
209-
210218
License
211219
-------
212220

213221
Just as the original snipMate plugin, all the snippets are licensed under the
214222
terms of the MIT license.
215223

216-
217224
[1]: http://github.com/garbas/vim-snipmate
218225
[2]: http://github.com/msanders
219226
[3]: http://github.com/garbas

0 commit comments

Comments
 (0)