change the default tab in snipMate
Asked Answered
E

3

7

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.

Engaging answered 22/3, 2013 at 14:9 Comment(0)
D
5

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>'
Dissyllable answered 22/3, 2013 at 14:28 Comment(0)
P
8

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
Papageno answered 8/3, 2015 at 15:8 Comment(1)
When I use this, <C-J> inserts the text <Plug>snipMateNextOrTriggerSpline
D
5

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>'
Dissyllable answered 22/3, 2013 at 14:28 Comment(0)
S
2

It is actually documented:

:help snipMate-remap
Spiritoso answered 29/8, 2013 at 1:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.