mirror of
https://github.com/gryf/snipmate.vim.git
synced 2025-12-22 22:28:02 +01:00
29 lines
807 B
VimL
29 lines
807 B
VimL
" These are the mappings for snipMate.vim. Putting it here ensures that it
|
|
" will be mapped after other plugins such as supertab.vim.
|
|
if exists('s:did_snips_mappings') || &cp || version < 700
|
|
finish
|
|
endif
|
|
let s:did_snips_mappings = 1
|
|
|
|
ino <silent> <tab> <c-r>=TriggerSnippet()<cr>
|
|
snor <silent> <tab> <esc>i<right><c-r>=TriggerSnippet()<cr>
|
|
snor <bs> b<bs>
|
|
snor ' b<bs>'
|
|
snor <right> <esc>a
|
|
snor <left> <esc>bi
|
|
|
|
" By default load snippets in snippets_dir
|
|
if empty(snippets_dir) || !isdirectory(snippets_dir)
|
|
finish
|
|
endif
|
|
|
|
if isdirectory(snippets_dir.'_')
|
|
call ExtractSnips(snippets_dir.'_', '_')
|
|
endif
|
|
if filereadable(snippets_dir.'_.snippets')
|
|
call ExtractSnipsFile(snippets_dir.'_.snippets')
|
|
endif
|
|
|
|
au FileType * if &ft != 'help' | call GetSnippets(g:snippets_dir) | endif
|
|
" vim:noet:sw=4:ts=4:ft=vim
|