-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated ultisnips and fixed ruby folding
- Loading branch information
Showing
62 changed files
with
5,830 additions
and
4,060 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,90 @@ | ||
- Support for ${VISUAL}. *UltiSnips-visual-placeholder* | ||
version 2.1: | ||
- Python interpolation access to text from visual selection via snip.v. | ||
- Support for transformations of ${VISUAL} texts. | ||
- New or improved snippets: python, tex, texmath, ruby, rails, html, django | ||
|
||
version 2.0: | ||
- Backwards incompatible change: Support for normal mode editing. Snippets | ||
are no longer exited when leaving insert mode but only by leaving the | ||
text span of the snippets. This allows usage of normal mode commands and | ||
autoformatting. It also increases compatibility with other plugins. | ||
- Backwards incompatible change: Changed glob patterns for snippets to | ||
behave more like Vim *UltiSnips-adding-snippets* | ||
- Backwards incompatible change: Zero Tabstop is no longer removed in | ||
nested snippets | ||
- Support for ${VISUAL:default text} placeholder. *UltiSnips-visual-placeholder* | ||
- Improved handling of utf-8 characters in files and snippet definitions. | ||
- Full support for :py3. UltiSnips now truly works with python >= 2.6. | ||
- Full support for :py3. UltiSnips now works with python >= 2.6 or >= 3.2. | ||
- New or improved snippets: python, all | ||
|
||
version 1.6: | ||
- Significant speed improvements and a few bugs fixed. | ||
- Better handling of non ASCII chars in snippets by assuming UTF-8 encoding | ||
when no other information is available. | ||
- Contributions for UltiSnips are now also accepted on GitHub: https://github.com/SirVer/ultisnips/ | ||
- New or improved snippets: ruby, rails, xhtml | ||
- Significant speed improvements and a few bugs fixed. | ||
- Better handling of non ASCII chars in snippets by assuming UTF-8 encoding | ||
when no other information is available. | ||
- Contributions for UltiSnips are now also accepted on GitHub: https://github.com/SirVer/ultisnips/ | ||
- New or improved snippets: ruby, rails, xhtml | ||
|
||
version 1.5: | ||
- Some critical bug fixes for new vim versions. | ||
- New or improved snippets: tex, texmath, python, jinja2, go, puppet, xhtml | ||
- Configuration of search path for snippets *UltiSnips-snippet-search-path* | ||
- New parser implementation: A little faster, more flexible and less bugged. | ||
- Some critical bug fixes for new vim versions. | ||
- New or improved snippets: tex, texmath, python, jinja2, go, puppet, xhtml | ||
- Configuration of search path for snippets *UltiSnips-snippet-search-path* | ||
- New parser implementation: A little faster, more flexible and less bugged. | ||
|
||
version 1.4: | ||
- New or improved snippets: php, html, djangohtml, mako, lua | ||
- Snippets are now listed alphabetically by their trigger, no longer in | ||
order of appearance | ||
- Snippet files are now automatically reloaded when they change. | ||
- Support for other directory names for snippets beside | ||
"UltiSnips" *UltiSnips-snippet-search-path* | ||
- Errors are now shown in a scratch window. | ||
- Now fully supports Windows with python >= 2.6. UltiSnips should now work | ||
on all systems that Vim runs on. | ||
- a syntax file was added for snippets files with nice highlighting. | ||
- snippets definition files now have the filetype 'snippets'. It used to be | ||
'snippet'. | ||
- New or improved snippets: php, html, djangohtml, mako, lua | ||
- Snippets are now listed alphabetically by their trigger, no longer in | ||
order of appearance | ||
- Snippet files are now automatically reloaded when they change. | ||
- Support for other directory names for snippets beside | ||
"UltiSnips" *UltiSnips-snippet-search-path* | ||
- Errors are now shown in a scratch window. | ||
- Now fully supports Windows with python >= 2.6. UltiSnips should now work | ||
on all systems that Vim runs on. | ||
- a syntax file was added for snippets files with nice highlighting. | ||
- snippets definition files now have the filetype 'snippets'. It used to be | ||
'snippet'. | ||
|
||
version 1.3: | ||
- Erlang snippets (g0rdin) | ||
- Other VimScripts can now define and immediately expand anonymous snippets | ||
( *UltiSnips_Anon* ) (Ryan Wooden) | ||
- Other VimScripts can now define new snippets via a function | ||
( *UltiSnips_AddSnippet* ) (Ryan Wooden) | ||
- New Snippets for eruby and rails (Ches Martin). | ||
- A new Option 't' has been added to snippets that avoid expanding tabstops. | ||
Be also more consistent with how indenting is handled. (Ryan Wooden) | ||
- Added a ftplugin script for .snippets files. Syntax highlighting still | ||
missing. (Rupa Deadwyler) | ||
- Added UltiSnipsReset and UltiSnipsEdit (Idea by JCEB) | ||
- Erlang snippets (g0rdin) | ||
- Other VimScripts can now define and immediately expand anonymous snippets | ||
( *UltiSnips_Anon* ) (Ryan Wooden) | ||
- Other VimScripts can now define new snippets via a function | ||
( *UltiSnips_AddSnippet* ) (Ryan Wooden) | ||
- New Snippets for eruby and rails (Ches Martin). | ||
- A new Option 't' has been added to snippets that avoid expanding tabstops. | ||
Be also more consistent with how indenting is handled. (Ryan Wooden) | ||
- Added a ftplugin script for .snippets files. Syntax highlighting still | ||
missing. (Rupa Deadwyler) | ||
- Added UltiSnipsReset and UltiSnipsEdit (Idea by JCEB) | ||
|
||
version 1.2: | ||
- many bugs were fixed | ||
- smode mappings for printable characters are now removed before expanding a | ||
snippet. This is configurable. *UltiSnips-warning-smappings* | ||
- all shipped snippets are now fully compatible with UltiSnips | ||
- added support for global snippets which enhance python interpolation even | ||
more *UltiSnips-globals* | ||
- added support for multi word and regular expression triggers. Very | ||
powerful in combination with python interpolation. | ||
- Python interpolation became much more powerful *UltiSnips-python* | ||
- added support for clearsnippets command *UltiSnips-clearing-snippets* | ||
- added support for option w which is a little more strict than i. | ||
- added support for listing of valid triggers. Defaults to <c-tab>. | ||
- added support for option i (inword expansion) | ||
- extends keyword is now supported on the first line of snippet files. This makes it easy to | ||
define special cases, for example cpp extends c: a cpp trigger is useless | ||
in c, but a c trigger is valuable for cpp. | ||
- UltiSnips now adheres to expandtab and tabstop options of vim | ||
- many bugs were fixed | ||
- smode mappings for printable characters are now removed before expanding a | ||
snippet. This is configurable. *UltiSnips-warning-smappings* | ||
- all shipped snippets are now fully compatible with UltiSnips | ||
- added support for global snippets which enhance python interpolation even | ||
more *UltiSnips-globals* | ||
- added support for multi word and regular expression triggers. Very | ||
powerful in combination with python interpolation. | ||
- Python interpolation became much more powerful *UltiSnips-python* | ||
- added support for clearsnippets command *UltiSnips-clearing-snippets* | ||
- added support for option w which is a little more strict than i. | ||
- added support for listing of valid triggers. Defaults to <c-tab>. | ||
- added support for option i (inword expansion) | ||
- extends keyword is now supported on the first line of snippet files. This makes it easy to | ||
define special cases, for example cpp extends c: a cpp trigger is useless | ||
in c, but a c trigger is valuable for cpp. | ||
- UltiSnips now adheres to expandtab and tabstop options of vim | ||
|
||
version 1.1: | ||
- Made triggers configurable. You can also use the same trigger for | ||
expanding and tabbing. The TextMate configuration <tab> and <s-tab> is now | ||
possible. | ||
- Conditional Inserts can now be nested | ||
- Added support for b option. This only considers a snippet at the beginning | ||
of a line ( *UltiSnips-adding-snippets* ) | ||
- Added support for ! option. This overwrites previously defined snippets | ||
with the same tab trigger ( *UltiSnips-adding-snippets* ) | ||
- Support for dotted filetype syntax. Now snippets for more than one filetype | ||
can be active ( *UltiSnips-adding-snippets* ) | ||
- Made triggers configurable. You can also use the same trigger for | ||
expanding and tabbing. The TextMate configuration <tab> and <s-tab> is now | ||
possible. | ||
- Conditional Inserts can now be nested | ||
- Added support for b option. This only considers a snippet at the beginning | ||
of a line ( *UltiSnips-adding-snippets* ) | ||
- Added support for ! option. This overwrites previously defined snippets | ||
with the same tab trigger ( *UltiSnips-adding-snippets* ) | ||
- Support for dotted filetype syntax. Now snippets for more than one filetype | ||
can be active ( *UltiSnips-adding-snippets* ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
global !p | ||
def newsoa(): | ||
import datetime | ||
now = datetime.datetime.now() | ||
# return standard SOA formatted serial for today | ||
return now.strftime("%Y%m%d00") | ||
endglobal | ||
|
||
snippet zone "Bootstrap a new Bind zonefile" b | ||
$TTL 86400 | ||
@ IN SOA ${1:example.net}. ${2:hostmaster.$1}.( | ||
`!p snip.rv = newsoa()`; serial | ||
21600; refresh every 6 hours | ||
3600; retry after one hour | ||
604800; expire after a week | ||
86400 ); minimum TTL of 1 day | ||
|
||
IN NS ns01.$1. | ||
IN MX 10 mail.$1. | ||
|
||
ns01.$1 IN A | ||
mail.$1 IN A | ||
endsnippet | ||
|
||
snippet A "Insert A Record" b | ||
${1:hostname} IN A ${2:ip} | ||
endsnippet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# From the TextMate bundle | ||
|
||
snippet fun "Function" b | ||
${1:name} = (${2:args}) -> | ||
${0:# body...} | ||
endsnippet | ||
|
||
snippet bfun "Function (bound)" b | ||
${1:(${2:args}) }=> | ||
${0:# body...} | ||
endsnippet | ||
|
||
snippet if "If" b | ||
if ${1:condition} | ||
${0:# body...} | ||
endsnippet | ||
|
||
snippet ife "If .. Else" b | ||
if ${1:condition} | ||
${2:# body...} | ||
else | ||
${3:# body...} | ||
endsnippet | ||
|
||
snippet elif "Else if" b | ||
else if ${1:condition} | ||
${0:# body...} | ||
endsnippet | ||
|
||
snippet ifte "Ternary if" b | ||
if ${1:condition} then ${2:value} else ${3:other} | ||
endsnippet | ||
|
||
snippet unl "Unless" b | ||
${1:action} unless ${2:condition} | ||
endsnippet | ||
|
||
snippet fora "Array Comprehension" b | ||
for ${1:name} in ${2:array} | ||
${0:# body...} | ||
endsnippet | ||
|
||
snippet foro "Object Comprehension" b | ||
for ${1:key}, ${2:value} of ${3:Object} | ||
${0:# body...} | ||
endsnippet | ||
|
||
snippet forr "Range Comprehension (inclusive)" b | ||
for ${1:name} in [${2:start}..${3:finish}]${4: by ${5:step}} | ||
${0:# body...} | ||
endsnippet | ||
|
||
snippet forrex "Range Comprehension (exclusive)" b | ||
for ${1:name} in [${2:start}...${3:finish}]${4: by ${5:step}} | ||
${0:# body...} | ||
endsnippet | ||
|
||
snippet swi "Switch" b | ||
switch ${1:object} | ||
when ${2:value} | ||
${0:# body...} | ||
endsnippet | ||
|
||
snippet cla "Class" b | ||
class ${1:ClassName}${2: extends ${3:Ancestor}} | ||
|
||
${4:constructor: (${5:args}) -> | ||
${6:# body...}} | ||
$7 | ||
endsnippet | ||
|
||
snippet try "Try .. Catch" b | ||
try | ||
$1 | ||
catch ${2:error} | ||
$3 | ||
endsnippet | ||
|
||
snippet req "Require" b | ||
${1/^'?(\w+)'?$/\L$1\E/} = require(${1:'${2:sys}'}) | ||
endsnippet | ||
|
||
snippet # "Interpolated Code" | ||
#{$1}$0 | ||
endsnippet | ||
|
||
snippet log "Log" b | ||
console.log ${1:"${2:msg}"} | ||
endsnippet | ||
|
Oops, something went wrong.