Created
September 23, 2013 11:46
-
-
Save ekalinin/6669425 to your computer and use it in GitHub Desktop.
List all available sinppets for current filetype
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
func! ListSnippets() | |
let snippets = split(system('egrep "^snippet" ~/.vim/snippets/' | |
\ . &filetype | |
\ . '.snippets | cut -d " " -f 2 | sort | uniq'), '\n') | |
call complete(col('.'), snippets) | |
return '' | |
endfunc | |
inoremap <S-F8> <C-R>=ListSnippets()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment