]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - vim/after/plugin/snipMate.vim
Update the stuff
[rbdr/dotfiles] / vim / after / plugin / snipMate.vim
... / ...
CommitLineData
1" These are the mappings for snipMate.vim. Putting it here ensures that it
2" will be mapped after other plugins such as supertab.vim.
3if !exists('loaded_snips') || exists('s:did_snips_mappings')
4 finish
5endif
6let s:did_snips_mappings = 1
7
8" This is put here in the 'after' directory in order for snipMate to override
9" other plugin mappings (e.g., supertab).
10"
11" You can safely adjust these mappings to your preferences (as explained in
12" :help snipMate-remap).
13ino <silent> <tab> <c-r>=TriggerSnippet()<cr>
14snor <silent> <tab> <esc>i<right><c-r>=TriggerSnippet()<cr>
15ino <silent> <s-tab> <c-r>=BackwardsSnippet()<cr>
16snor <silent> <s-tab> <esc>i<right><c-r>=BackwardsSnippet()<cr>
17ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr>
18
19" The default mappings for these are annoying & sometimes break snipMate.
20" You can change them back if you want, I've put them here for convenience.
21snor <bs> b<bs>
22snor <right> <esc>a
23snor <left> <esc>bi
24snor ' b<bs>'
25snor ` b<bs>`
26snor % b<bs>%
27snor U b<bs>U
28snor ^ b<bs>^
29snor \ b<bs>\
30snor <c-x> b<bs><c-x>
31
32" By default load snippets in snippets_dir
33if empty(snippets_dir)
34 finish
35endif
36
37call GetSnippets(snippets_dir, '_') " Get global snippets
38
39au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif
40" vim:noet:sw=4:ts=4:ft=vim