Skip to content

Instantly share code, notes, and snippets.

@ekalinin
Created September 23, 2013 11:46
Show Gist options
  • Save ekalinin/6669425 to your computer and use it in GitHub Desktop.
Save ekalinin/6669425 to your computer and use it in GitHub Desktop.
List all available sinppets for current filetype
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