1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2026-04-18 21:53:33 +02:00
Files
snipmate.vim/after/plugin/snipMate.vim
Martin Grenfell b5999ba5cc bugfix: dont source file based snippets more than once
Set the s:did_<filetype> flag after reading in
file based snippets. This prevents snippets getting read in more than
once.

Move the code that checks for file based snippets out of
after/plugin/snipMate.vim and into plugin/snipMate.vim. Refactor this
code into functions for readability.

Signed-off-by: meese <msanders42@gmail.com>
2009-03-01 05:44:07 +08:00

14 lines
413 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