aboutsummaryrefslogtreecommitdiff
path: root/files/.vim/after/plugin/snipMate.vim
diff options
context:
space:
mode:
authorAnton Bobov <bobov_a@sibsac.ru>2011-10-13 11:17:19 +0600
committerAnton Bobov <bobov_a@sibsac.ru>2011-10-13 11:17:19 +0600
commitda709cd9e90c3ab644bb92700f0ed40d965b80d3 (patch)
tree144e5470327f72b8489141cd7595b652c6c32616 /files/.vim/after/plugin/snipMate.vim
Initial commit.
Diffstat (limited to 'files/.vim/after/plugin/snipMate.vim')
-rwxr-xr-xfiles/.vim/after/plugin/snipMate.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/files/.vim/after/plugin/snipMate.vim b/files/.vim/after/plugin/snipMate.vim
new file mode 100755
index 0000000..d2989cf
--- /dev/null
+++ b/files/.vim/after/plugin/snipMate.vim
@@ -0,0 +1,23 @@
+" 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
+
+" By default load snippets in snippets_dir
+if empty(snippets_dir)
+ finish
+endif
+
+call GetSnippets(snippets_dir, '_') " Get global snippets
+
+au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif
+" vim:noet:sw=4:ts=4:ft=vim