Quick tip: You can add vim configuration options in source code comments, and vim will load them when it loads the file. For instance, I tend to put
// vim: et ts=4
at the top of my source files, to ensure that tabs are always expanded to four spaces.
March 19, 2010 at 23:33
It’s also very useful to add sw=4 to ensure shifting is also moved by 4. Ex. for indentation modifiers “<>” and the autoindent “g=”.
March 19, 2010 at 23:35
Ugh.. that should have been “<<” and “>>” if this comment system hadn’t gone haywire.
March 20, 2010 at 14:19
Thanks Simen, and congratulations on the very first post! :)