Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How to enter a tab character in vim with SuperTab plugin enabled?

share|improve this question
add comment

3 Answers 3

up vote 12 down vote accepted

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.

share|improve this answer
1  
In the ^V docs 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 Apr 5 '13 at 18:05
add comment

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.

share|improve this answer
add comment

You could also use the indent functionality by typing >> which depending on your indent settings would use a tab character.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.