1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00

Updated plugins. Fixed some issues related to empty space and peaksea. Using Source Code Pro as default font

This commit is contained in:
amix
2013-12-28 18:23:13 +00:00
parent 86f4456be1
commit 08a64d943d
35 changed files with 553 additions and 90 deletions

View File

@ -8,6 +8,7 @@ It is currently maintained by [Rok Garbas](rok@garbas.si), [Marc
Weber](marco-oweber@gmx.de), and [Adnan Zafar](https://github.com/ajzafar) with
additional contributions from:
* [907th](https://github.com/907th)
* [alderz](https://github.com/alderz)
* [asymmetric](https://github.com/asymmetric)
* [bpugh](https://github.com/bpugh)

View File

@ -706,12 +706,25 @@ fun! s:ChooseSnippet(snippets)
return funcref#Call(a:snippets[keys(a:snippets)[idx]])
endf
fun! snipMate#ShowAvailableSnips()
let col = col('.')
let word = matchstr(getline('.'), '\S\+\%'.col.'c')
fun! snipMate#WordBelowCursor()
return matchstr(getline('.'), '\S\+\%' . col('.') . 'c')
endf
let snippets = map(snipMate#GetSnippetsForWordBelowCursor(word, '*', 0),'v:val[0]')
let matches = filter(snippets, "v:val =~# '\\V\\^" . escape(word, '\') . "'")
fun! snipMate#GetSnippetsForWordBelowCursorForComplete(word)
let snippets = map(snipMate#GetSnippetsForWordBelowCursor(a:word, '*', 0), 'v:val[0]')
return filter(snippets, "v:val =~# '\\V\\^" . escape(a:word, '\') . "'")
endf
fun! snipMate#CanBeTriggered()
let word = snipMate#WordBelowCursor()
let matches = snipMate#GetSnippetsForWordBelowCursorForComplete(word)
return len(matches) > 0
endf
fun! snipMate#ShowAvailableSnips()
let col = col('.')
let word = snipMate#WordBelowCursor()
let matches = snipMate#GetSnippetsForWordBelowCursorForComplete(word)
" Pretty hacky, but really can't have the tab swallowed!
if len(matches) == 0