Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change the default tab in snipMate

Tags:

vim

snipmate

I have been reading the documentation for a while but I can't seem to find any information on how to change the default key for completion in snipMate.

Here is the documentation. https://github.com/garbas/vim-snipmate/blob/master/doc/snipMate.txt Did I overlook something?

Thank you.

like image 251
Lim H. Avatar asked Mar 22 '13 14:03

Lim H.


3 Answers

In :help SnipMate-mappings

The mappings SnipMate uses can be customized with the :map commands.For example, to change the key that triggers snippets and moves to the next tab stop, >

    :imap <C-J> <Plug>snipMateNextOrTrigger
    :smap <C-J> <Plug>snipMateNextOrTrigger
like image 84
Federico Avatar answered Oct 22 '22 01:10

Federico


It's done via two variables; it doesn't seem to be documented, but it's done in after/plugin/snipMate.vim. To override, redefine these variables before the plugin is sourced, e.g. in your ~/.vimrc:

:let g:snips_trigger_key = '<tab>'
:let g:snips_trigger_key_backwards = '<s-tab>'
like image 5
Ingo Karkat Avatar answered Oct 21 '22 23:10

Ingo Karkat


It is actually documented:

:help snipMate-remap
like image 2
ilstam Avatar answered Oct 21 '22 23:10

ilstam