SPACES to TABS in vim!
22 July 2009 10:50 am
Look. There are two types of people in this world. Those who indent their code with spaces and those that employ tabs. The prior group – uncouth, potentially violent, socially awkward, unbecoming to the eye, slovenly – are to be avoided. The latter – enlightened, generally esteemed, correct in their posture – are the people who you really want to be around, to learn from, to emulate. So maybe you use the editor vim to write code (and not emacs! of course not emacs!) and you want to convert all those nasty spaces to tabs whenever you’re working. I HAVE YOUR ANSWER. Put the following in your .vimrc file:
set noet|retab!
If you do not wish this to be a global, always-on setting (that is, if you find yourself in the pursuit of gainful employment having to coexist with these tabs people), you can simply run it while in vim by typing the same line after issuing a ‘:’ command.
GOOD LUCK, GODSPEED, and continue to fight the good fight. ¶
One Response to SPACES to TABS in vim!
Not Bill Lee on January 24th, 2010 at 8:51 pm
Tabs ? Tabs ?
Space, man. Bill Lee says so.
Leave a comment