3

I am using gVim on Windows, and have only recently run into a very problematic situation: my Tab key stops working in insert mode! Pressing the Tab key does not give any output.

In order to use the plugin snipmate which expands snippets by calling a function defined as <Plug>-function, I have to remap ctrl+q to achieve the functionality. However, when I map the same content to Tab, pressing the key is still not bringing me anything.

I checked the mappings defined for <tab> using two methods:

  1. Using Listmaps plugin, by calling the command :Listmaps, and found that <tab> has been defined correctly;
  2. The mapping on <tab> seems to be valid upon checking :map <tab>;

Nevertheless, Tab seems to have been disabled.

What I don't understand is that: how come the same syntax of mapping would bring about different results. Who should I specify the <Plug>Func() mappings? If this is really wired, would it be worth it to try a fresh installation?

Thank you!

The pair of mappings that I have specified:

imap <c-q> <Plug>snipMateNextOrTrigger
imap <tab> <Plug>snipMateNextOrTrigger
  • Is it possible that Vim is not able to detect the Tab key being pressed? – Durga Swaroop Jul 5 '16 at 9:10
  • check set paste?. If the output is not nopaste, turn off paste mode, the mappings should work fine then. Disable pastemode by default, and add something like set pastetoggle=<F2> to your vimrc file – Elias Van Ootegem Jan 6 '17 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.