mirror of
https://github.com/amix/vimrc
synced 2025-06-30 11:54:59 +08:00
Updated plugins
This commit is contained in:
@ -34,6 +34,7 @@ additional contributions from:
|
||||
* [mikeastock](https://github.com/mikeastock)
|
||||
* [muffinresearch](https://github.com/muffinresearch)
|
||||
* [munyari](https://github.com/munyari)
|
||||
* [nickelization](https://github.com/nickelization)
|
||||
* [pielgrzym](https://github.com/pielgrzym)
|
||||
* [pose](https://github.com/pose)
|
||||
* [r00k](https://github.com/r00k)
|
||||
|
@ -583,7 +583,22 @@ function! snipMate#TriggerSnippet(...) abort
|
||||
call feedkeys(SuperTabKey) | return ''
|
||||
endif
|
||||
call feedkeys("\<esc>a", 'n') " Close completion menu
|
||||
call feedkeys("\<tab>") | return ''
|
||||
" Once we've dismissed the completion menu, we have to cause this
|
||||
" function to be executed over again, so that we actually get the
|
||||
" snippet triggered. (Simply continuing to execute fails because
|
||||
" we have to finish this function before the results of feedkeys take
|
||||
" effect and dismiss the completion menu. Recursing also fails for
|
||||
" similar reasons.)
|
||||
if a:0 == 0
|
||||
" Would be nice to have a more robust solution than manually
|
||||
" branching on the arguments. I tried to do something like:
|
||||
" call call(function('snipMate#TriggerSnippet'), a:000)
|
||||
" But I couldn't quite get it working. Maybe somebody else with
|
||||
" better vimscript skills can find a way to make it work, though?
|
||||
call feedkeys("\<Plug>snipMateNextOrTrigger") | return ''
|
||||
else
|
||||
call feedkeys("\<Plug>snipMateTrigger") | return ''
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists('b:snip_state') && a:0 == 0 " Jump only if no arguments
|
||||
|
@ -359,9 +359,13 @@ selected in |Select-mode|. For example, >
|
||||
$0
|
||||
</div>
|
||||
|
||||
Finally, placeholders can contain mirrors and evaluations (detailed below) and
|
||||
even entire other tab stops. If the placeholder is edited, then these nested
|
||||
tab stops are removed and skipped entirely. For example, >
|
||||
Finally, placeholders can contain mirrors and evaluations (detailed below)
|
||||
and, in version 1 of the snippet parser, even entire other tab stops. If the
|
||||
placeholder is edited, then these nested tab stops are removed and skipped
|
||||
entirely.
|
||||
NOTE: Version 1 of the snippet parser must be used! See
|
||||
|SnipMate-parser-versions|.
|
||||
For example, >
|
||||
|
||||
snippet div
|
||||
<div${1: id="${2:id}"}${3: class="${4:class}"}>
|
||||
@ -469,6 +473,8 @@ Which version is used is determined by version directives in snippet files
|
||||
(|SnipMate-options|).
|
||||
|
||||
A complete list of current differences is as follows:
|
||||
- Version 0 does not support nested placeholders such as ${1:"${2:foo}"} at
|
||||
all.
|
||||
- Backslash escaping is guaranteed to work in version 1. In certain edge cases
|
||||
this may not work in version 0.
|
||||
- Certain syntactic errors, such as a missing closing brace for a tabstop, are
|
||||
@ -478,7 +484,7 @@ A complete list of current differences is as follows:
|
||||
- Braces are not mandatory in version 1. SnipMate will determine which
|
||||
instance of a stop ID to use based on the presence of a placeholder, or
|
||||
whichever instance occurs first. Braces can therefore be used to
|
||||
disambiguate between stop 12, $12, and stop 1 followed by a 2, ${1}2. In
|
||||
disambiguate between stop 12, $12, and stop 1 followed by a 2: ${1}2. In
|
||||
other words, version 0 makes a distinction between a mirror and a stop while
|
||||
version 1 resolves the differences for you.
|
||||
- Placeholders are not mandatory to enable mirror support in version 1.
|
||||
@ -489,6 +495,21 @@ A complete list of current differences is as follows:
|
||||
- Transformations similar to |:substitute| can be preformed on any mirror,
|
||||
including visual content.
|
||||
|
||||
*SnipMate-deprecate*
|
||||
Deprecation~
|
||||
|
||||
The legacy parser, version 0, is deprecated. It is currently still the default
|
||||
parser, but that will be changing. NOTE that switching which parser you use
|
||||
could require changes to your snippets--see the previous section.
|
||||
|
||||
To continue using the old parser, set g:snipMate.snippet_version (see
|
||||
|SnipMate-options|) to 0 in your |vimrc|.
|
||||
|
||||
Setting g:snipMate.snippet_version to either 0 or 1 will remove the start up
|
||||
message. One way this can be done--to use the new parser--is as follows:
|
||||
>
|
||||
let g:snipMate = { 'snippet_version' : 1 }
|
||||
<
|
||||
==============================================================================
|
||||
SNIPPET SOURCES *SnipMate-snippet-sources*
|
||||
|
||||
|
@ -57,6 +57,10 @@ endif
|
||||
let g:snipMate['no_match_completion_feedkeys_chars'] =
|
||||
\ get(g:snipMate, 'no_match_completion_feedkeys_chars', "\t")
|
||||
|
||||
if !exists('g:snipMate.snippet_version')
|
||||
echom 'The legacy SnipMate parser is deprecated. Please see :h SnipMate-deprecate.'
|
||||
endif
|
||||
|
||||
" Add default scope aliases, without overriding user settings
|
||||
let g:snipMate.scope_aliases = get(g:snipMate, 'scope_aliases', {})
|
||||
if exists('g:snipMate_no_default_aliases')
|
||||
|
Reference in New Issue
Block a user