" 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('loaded_snips') || exists('s:did_snips_mappings') finish endif let s:did_snips_mappings = 1 " save and reset 'cpo' let s:save_cpo = &cpo set cpo&vim " This is put here in the 'after' directory in order for snipMate to override " other plugin mappings (e.g., supertab). " " To adjust the tirgger key see (:h snipMate-trigger) " if !exists('g:snips_trigger_key') let g:snips_trigger_key = '' endif if !exists('g:snips_trigger_key_backwards') let g:snips_trigger_key_backwards = ']', '', 'g') . '>' endif exec 'ino ' . g:snips_trigger_key . ' =snipMate#TriggerSnippet()' exec 'snor ' . g:snips_trigger_key . ' i=snipMate#TriggerSnippet()' exec 'ino ' . g:snips_trigger_key_backwards . ' =snipMate#BackwardsSnippet()' exec 'snor ' . g:snips_trigger_key_backwards . ' i=snipMate#BackwardsSnippet()' exec 'ino ' . g:snips_trigger_key . ' =snipMate#ShowAvailableSnips()' " maybe there is a better way without polluting registers ? exec 'xnoremap ' . g:snips_trigger_key. ' s:letg:snipmate_content_visual=getreg('1')' " The default mappings for these are annoying & sometimes break snipMate. " You can change them back if you want, I've put them here for convenience. snor b snor a snor bi snor ' b' snor ` b` snor % b% snor U bU snor ^ b^ snor \ b\ snor b " By default load snippets in snippets_dir if empty(snippets_dir) finish endif " restore 'cpo' let &cpo = s:save_cpo " vim:noet:sw=4:ts=4:ft=vim