]> git.madduck.net Git - etc/vim.git/blob - .vim/after/plugin/snipMate.vim

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

03e79ae296fdd88be4d040b1f1a73c78266ff2e5
[etc/vim.git] / .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 ino <silent> <tab> <c-r>=TriggerSnippet()<cr>
9 snor <silent> <tab> <esc>i<right><c-r>=TriggerSnippet()<cr>
10 ino <silent> <s-tab> <c-r>=BackwardsSnippet()<cr>
11 snor <silent> <s-tab> <esc>i<right><c-r>=BackwardsSnippet()<cr>
12 ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr>
13
14 " The default mappings for these are annoying & sometimes break snipMate.
15 " You can change them back if you want, I've put them here for convenience.
16 snor <bs> b<bs>
17 snor <right> <esc>a
18 snor <left> <esc>bi
19 snor ' b<bs>'
20 snor ` b<bs>`
21 snor % b<bs>%
22 snor U b<bs>U
23 snor ^ b<bs>^
24 snor \ b<bs>\
25 snor <c-x> b<bs><c-x>
26
27 " By default load snippets in snippets_dir
28 if empty(snippets_dir)
29         finish
30 endif
31
32 call GetSnippets(snippets_dir, '_') " Get global snippets
33
34 au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif
35 " vim:noet:sw=4:ts=4:ft=vim