Insert a tab character in vim when expand tabs is on

I have vim set-up to use spaces in place of tabs. Sometimes you need to use an actual tab e.g. editing a Makefile. Now whilst it's possible to change settings so that tabs are used for specific files, a quick tip to remember is to simply type in insert mode:

Ctrl+v tab

That is Ctrl and "V" and hit the tab key, et voila you've entered an actual tab.

Show Comments