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.
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=”.
Ugh.. that should have been “<<” and “>>” if this comment system hadn’t gone haywire.
Thanks Simen, and congratulations on the very first post! :)