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:
- Using
Listmaps
plugin, by calling the command:Listmaps
, and found that<tab>
has been defined correctly; - 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
Tab
key being pressed?set paste?
. If the output is notnopaste
, turn off paste mode, the mappings should work fine then. Disable pastemode by default, and add something likeset pastetoggle=<F2>
to your vimrc file