How to enter a tab character in vim with SuperTab plugin enabled?
3 Answers
I've not used this extension myself, but I would guess that ^V-Tab might work. ^V in general can be used in insert mode to insert a literal keystroke instead of whatever that key is mapped to do. So you type Control-V, then hit whatever key or key combo you want to insert literally.
- 1In the
^Vdocs at:help i_^v: "Note: When CTRL-V is mapped (e.g., to paste text) you can often use CTRL-Q instead." See:help i_^q.Rory O'Kane– Rory O'Kane2013-04-05 18:05:29 +00:00Commented Apr 5, 2013 at 18:05
If you want to simulate pressing <tab> as if SuperTab were not installed (i.e. you want to insert a tab that respects your :set expandtab settings) then press Ctrl-Tab.
^V-<tab> inserts a literal tab. If you have :set expandtab enabled then this might not be what you want, because it inserts a real Tab character, not a series of spaces.
You could also use the indent functionality by typing >> which depending on your indent settings would use a tab character.