I have set expandtab in my .vimrc file to convert tab to multiple space characters. However some files (like Makefile) need actual the tab character inserted.Is there an easy way to force the insertion the tab while I am typing?
Insert tabs in INSERT mode when expandtab is set
insert mode;tab characters
Instead of just pressing Tab, first press Ctrl-V and then press Tab.This can be used to insert a variety of special chars. See :help i_CTRL-V for details.Ctrl-V also works in command-line mode (:help c-CTRL-V), and even in some other programs entirely. (e.g. bash, mutt.)If you have Ctrl-V mapped to something else, try Ctrl-Q. This has the same effect in Vim as Ctrl-V, but some terminals use it for control flow, in which case Vim won't ever see it.