]> git.r.bdr.sh - rbdr/dotfiles/blob - vim/after/plugin/snipMate.vim
A whole bunch of new additions to the submodules
[rbdr/dotfiles] / vim / after / plugin / snipMate.vim
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.
3 if !exists('loaded_snips') || exists('s:did_snips_mappings')
4 finish
5 endif
6 let 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).
13 ino <silent> <tab> <c-r>=TriggerSnippet()<cr>
14 snor <silent> <tab> <esc>i<right><c-r>=TriggerSnippet()<cr>
15 ino <silent> <s-tab> <c-r>=BackwardsSnippet()<cr>
16 snor <silent> <s-tab> <esc>i<right><c-r>=BackwardsSnippet()<cr>
17 ino <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.
21 snor <bs> b<bs>
22 snor <right> <esc>a
23 snor <left> <esc>bi
24 snor ' b<bs>'
25 snor ` b<bs>`
26 snor % b<bs>%
27 snor U b<bs>U
28 snor ^ b<bs>^
29 snor \ b<bs>\
30 snor <c-x> b<bs><c-x>
31
32 " By default load snippets in snippets_dir
33 if empty(snippets_dir)
34 finish
35 endif
36
37 call GetSnippets(snippets_dir, '_') " Get global snippets
38
39 au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif
40 " vim:noet:sw=4:ts=4:ft=vim