mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
Updated vim plugins
This commit is contained in:
@ -42,4 +42,5 @@ additional contributions from:
|
||||
* [steveno](https://github.com/steveno)
|
||||
* [taq](https://github.com/taq)
|
||||
* [thisgeek](https://github.com/thisgeek)
|
||||
* [trusktr](https://github.com/trusktr)
|
||||
* [Xandaros](https://github.com/Xandaros)
|
||||
|
@ -19,7 +19,9 @@ Garbas][garbas], [Marc Weber][marcweber], and [Adnan Zafar][ajzafar].
|
||||
|
||||
We recommend one of the following methods for installing SnipMate and its
|
||||
dependencies. SnipMate depends on [vim-addon-mw-utils][mw-utils] and
|
||||
[tlib][tlib]. Since SnipMate does not ship with any snippets, we suggest
|
||||
[tlib][tlib].
|
||||
|
||||
> **NOTE:** SnipMate does not ship with any snippets out of the box. We suggest
|
||||
looking at the [vim-snippets][vim-snippets] repository.
|
||||
|
||||
* Using [VAM][vam], add `vim-snippets` to the list of packages to be installed.
|
||||
|
@ -329,9 +329,9 @@ endfunction
|
||||
|
||||
function! s:snippet_filenames(scope, trigger) abort
|
||||
let mid = ['', '_*', '/*']
|
||||
let mid += map(copy(mid[1:]), "'/' . a:trigger . '*' . v:val")
|
||||
return join(map(mid, "'snippets/' . a:scope . v:val . '.snippet'"
|
||||
\ . ". (v:key < 3 ? 's' : '')"))
|
||||
let mid += map(copy(mid), "'/' . a:trigger . '*' . v:val")
|
||||
call map(mid, "'snippets/' . a:scope . v:val . '.snippet'")
|
||||
return join(map(mid[:2], 'v:val . "s"') + mid[3:])
|
||||
endfunction
|
||||
|
||||
function! snipMate#SetByPath(dict, trigger, path, snippet, bang, snipversion) abort
|
||||
@ -455,7 +455,7 @@ fun! snipMate#GetSnippetsForWordBelowCursor(word, exact) abort
|
||||
let parts = split(a:word, '\W\zs')
|
||||
" Since '\W\zs' results in splitting *after* a non-keyword character, the
|
||||
" first \W stays connected to whatever's before it, so split it off
|
||||
if len(parts) > 1 && len(parts[0]) > 1
|
||||
if !empty(parts) && parts[0] =~ '\W$'
|
||||
let parts = [ parts[0][:-2], strpart(parts[0], len(parts[0]) - 1) ]
|
||||
\ + parts[1:]
|
||||
endif
|
||||
|
Reference in New Issue
Block a user