Skip to content

Commit 90dc0a2

Browse files
SirVervim-scripts
authored andcommitted
Version 3.0
- Organisational changes: The project is now hosted on github. Snippets are now shipped separately - please track honza/vim-snippets. - UltiSnips is now a drop in replacement for snipMate - it parses snipMate snippets and expands them emulating snipMates smaller feature set. - Filetype tab completion for UltiSnipsEdit. - UltiSnipsEdit now only edits private snippet files. Use UltiSnipsEdit! if you want to edit shipped files. - New option 's' which strips trailing whitespace before jumping to next tabstop - New option 'a' which converts non-ascii characters into ascii characters in transformations. - New keyword in snippet files: priority defines which snippets should overwrite others. This deprecates the '!' option. *UltiSnips-adding-snippets* - Remove common whitespace of visual line selections before inserting in an indented tabstop. - Support for overwriting the snippet directory name on a per buffer basis to support per project snippets. *UltiSnips-snippet-search-path* - The keymaps for jumping in snippets are now only mapped when a snippet is active, allowing them to be used for something else otherwise. - Expanding and jumping no longer overwrites the unnamed register. - Integration with Valloric/YouCompleteMe and Shougo/neocomplete.vim. - Other plugins can add sources for snippets to create snippets on the fly. *UltiSnips-extending* - Vim functions now indicates if it did any work. *UltiSnips-trigger-functions* - For python extensions: UltiSnips adds itself to the sys.path and can be easily imported if it is available. *UltiSnips-python-module-path* - A new function giving programmatic access to the snippets currently available for expansion for other plugins integrating with UltiSnips. *UltiSnips_SnippetsInCurrentScope* - New or improved snippets (now in a different repo): all, bib, c, cpp, cs, d, django, eruby, go, haskell, html, html, htmljinja, java, javascript, js, ledger, ocaml, perl, php, puppet, python, ruby, scss, sh, tex, vim, xml, zsh.
1 parent f73cb61 commit 90dc0a2

File tree

114 files changed

+5809
-9531
lines changed

Some content is hidden

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

114 files changed

+5809
-9531
lines changed

.bzrignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
doc/tags
2+
.bzr-repo

ChangeLog

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
1-
version 2.2:
1+
version 3.0 (02-Mar-2014):
2+
- Organisational changes: The project is now hosted on github. Snippets are
3+
now shipped separately - please track honza/vim-snippets.
4+
- UltiSnips is now a drop in replacement for snipMate - it parses snipMate
5+
snippets and expands them emulating snipMates smaller feature set.
6+
- Filetype tab completion for UltiSnipsEdit.
7+
- UltiSnipsEdit now only edits private snippet files. Use UltiSnipsEdit! if
8+
you want to edit shipped files.
9+
- New option 's' which strips trailing whitespace before jumping to next
10+
tabstop
11+
- New option 'a' which converts non-ascii characters into ascii characters
12+
in transformations.
13+
- New keyword in snippet files: priority defines which snippets should
14+
overwrite others. This deprecates the '!' option.
15+
*UltiSnips-adding-snippets*
16+
- Remove common whitespace of visual line selections before inserting in an
17+
indented tabstop.
18+
- Support for overwriting the snippet directory name on a per buffer basis
19+
to support per project snippets. *UltiSnips-snippet-search-path*
20+
- The keymaps for jumping in snippets are now only mapped when a snippet is
21+
active, allowing them to be used for something else otherwise.
22+
- Expanding and jumping no longer overwrites the unnamed register.
23+
- Integration with Valloric/YouCompleteMe and Shougo/neocomplete.vim.
24+
- Other plugins can add sources for snippets to create snippets on the fly.
25+
*UltiSnips-extending*
26+
- Vim functions now indicates if it did any work.
27+
*UltiSnips-trigger-functions*
28+
- For python extensions: UltiSnips adds itself to the sys.path and can be
29+
easily imported if it is available. *UltiSnips-python-module-path*
30+
- A new function giving programmatic access to the snippets currently
31+
available for expansion for other plugins integrating with UltiSnips.
32+
*UltiSnips_SnippetsInCurrentScope*
33+
- New or improved snippets (now in a different repo): all, bib, c, cpp, cs,
34+
d, django, eruby, go, haskell, html, html, htmljinja, java, javascript,
35+
js, ledger, ocaml, perl, php, puppet, python, ruby, scss, sh, tex, vim,
36+
xml, zsh.
37+
38+
version 2.2 (01-Sep-2012):
239
- Support to silence Python-not-found warnings. *UltiSnips-python-warning*
340
- Matchit support for snippet files.
441
- Improvements to syntax file.
@@ -9,12 +46,12 @@ version 2.2:
946
json, html, coffee, coffee_jasmine, javascript_jasmine, ruby, php,
1047
markdown.
1148

12-
version 2.1:
49+
version 2.1 (14-Feb-2012):
1350
- Python interpolation access to text from visual selection via snip.v.
1451
- Support for transformations of ${VISUAL} texts.
1552
- New or improved snippets: python, tex, texmath, ruby, rails, html, django
1653

17-
version 2.0:
54+
version 2.0 (05-Feb-2012):
1855
- Backwards incompatible change: Support for normal mode editing. Snippets
1956
are no longer exited when leaving insert mode but only by leaving the
2057
text span of the snippets. This allows usage of normal mode commands and
@@ -28,20 +65,20 @@ version 2.0:
2865
- Full support for :py3. UltiSnips now works with python >= 2.6 or >= 3.2.
2966
- New or improved snippets: python, all
3067

31-
version 1.6:
68+
version 1.6 (30-Dec-2011):
3269
- Significant speed improvements and a few bugs fixed.
3370
- Better handling of non ASCII chars in snippets by assuming UTF-8 encoding
3471
when no other information is available.
3572
- Contributions for UltiSnips are now also accepted on GitHub: https://github.com/SirVer/ultisnips/
3673
- New or improved snippets: ruby, rails, xhtml
3774

38-
version 1.5:
75+
version 1.5 (24-Sep-2011):
3976
- Some critical bug fixes for new vim versions.
4077
- New or improved snippets: tex, texmath, python, jinja2, go, puppet, xhtml
4178
- Configuration of search path for snippets *UltiSnips-snippet-search-path*
4279
- New parser implementation: A little faster, more flexible and less bugged.
4380

44-
version 1.4:
81+
version 1.4 (17-Jul-2011):
4582
- New or improved snippets: php, html, djangohtml, mako, lua
4683
- Snippets are now listed alphabetically by their trigger, no longer in
4784
order of appearance
@@ -55,7 +92,7 @@ version 1.4:
5592
- snippets definition files now have the filetype 'snippets'. It used to be
5693
'snippet'.
5794

58-
version 1.3:
95+
version 1.3 (14-Feb-2011):
5996
- Erlang snippets (g0rdin)
6097
- Other VimScripts can now define and immediately expand anonymous snippets
6198
( *UltiSnips_Anon* ) (Ryan Wooden)
@@ -68,7 +105,7 @@ version 1.3:
68105
missing. (Rupa Deadwyler)
69106
- Added UltiSnipsReset and UltiSnipsEdit (Idea by JCEB)
70107

71-
version 1.2:
108+
version 1.2 (24-Aug-2010):
72109
- many bugs were fixed
73110
- smode mappings for printable characters are now removed before expanding a
74111
snippet. This is configurable. *UltiSnips-warning-smappings*
@@ -87,7 +124,7 @@ version 1.2:
87124
in c, but a c trigger is valuable for cpp.
88125
- UltiSnips now adheres to expandtab and tabstop options of vim
89126

90-
version 1.1:
127+
version 1.1 (21-Jul-2009):
91128
- Made triggers configurable. You can also use the same trigger for
92129
expanding and tabbing. The TextMate configuration <tab> and <s-tab> is now
93130
possible.

README

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,5 @@
11
This is a mirror of http://www.vim.org/scripts/script.php?script_id=2715
22

3-
UltiSnips is the Ultimate solution for snippets under Vim. Snippets are intelligent texts that spare you a lot of typing. Like many snippets solutions, this one ins heavily inspired by TextMates Snippet Syntax and offers all features that TextMate offers plus some more. But in Vim.
3+
UltiSnips is the Ultimate solution for snippets under Vim.
44

5-
Screencasts:
6-
Intro: http://www.sirver.net/blog/2011/12/30/first-episode-of-ultisnips-screencast/
7-
Basic Snippets: http://www.sirver.net/blog/2012/01/08/second-episode-of-ultisnips-screencast/
8-
Version 2.0s new features: http://www.sirver.net/blog/2012/02/05/third-episode-of-ultisnips-screencast/
9-
Python Interpolation: http://www.sirver.net/blog/2012/03/31/fourth-episode-of-ultisnips-screencast/
10-
11-
UltiSnips has the following features (incomplete list):
12-
13-
- TextMates snippet syntax
14-
- Tabstops, Placeholders (also nested)
15-
- Mirrors and Transformations (also inside Placeholders)
16-
- ShellCode, VimCode and a very powerful PythonCode interpolation
17-
- Live update as you type
18-
- snippets for file types and snippets that are always defined
19-
- same name, multiple snippets
20-
- recursive snippets: snippet in snippet
21-
- forward and backward jumping to placeholders and tab stops
22-
- convert script to download and convert TM bundles, convert script to reuse snipmates snippets.
23-
- automatically reload snippet definition files when they changed.
24-
- extend existing snippet definitions. For example cpp extends c, so that all c snippets are also available in cpp.
25-
- options for snippets: expand only at the beginning of line, inword, convert tabs-to-spaces....
26-
- multi word or regular expression triggers are supported and awesome!
27-
- edit snippets with normal mode commands and move around in them freely while editing
28-
- support for anonymous triggers that other scripts can define on the fly e.g. for automatic completion of parameters of your own functions.
29-
- > 400 unit tests to guarantee that stuff works.
30-
- Tested on Linux, Mac OS X and Windows.
31-
32-
There have been many attempts to do things right; I think, this one nails it.
33-
34-
UltiSnips is a community project, more than 15 people have contributed to it so far. Join in by providing feedback, snippets or code!
35-
36-
Try it:
37-
Example 1:
38-
- open /tmp/file.c
39-
type for<tab>endcounter<c-j>mycounter<c-j><c-j>int a = 3;
40-
yields:
41-
------------------- SNIP -------------------
42-
for(size_t mycounter = 0; mycounter < endcounter; ++mycounter)
43-
{
44-
int a = 3;
45-
}
46-
------------------- SNAP -------------------
47-
48-
Example 2:
49-
- open /tmp/blah.help
50-
- :set ft=help
51-
- type sec<tab>MY COOL SECTION<c-h>blah
52-
yields:
53-
------------------- SNIP -------------------
54-
=============================================================================
55-
MY COOL SECTION *blah-my-cool-section*
56-
57-
blah
58-
------------------- SNAP -------------------
59-
60-
61-
If you like the script, please contact me and vote for the script!
5+
https://github.com/sirver/ultisnips

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+

README.rst

Lines changed: 0 additions & 33 deletions
This file was deleted.

UltiSnips/README

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)