Cracking Vim tip
This is one that surprised me, which means it's a really good idea!From the Vim kung fu thread. Lots of other good stuff in there, too, for my fellow masters of the text-editor.// vim: ts=4
Add comments like this to your source file to auto-set vim options.
Doesn't matter how you comment it, as long as nothing comes after it, so
/*
vim: ts=4
*/
or
# vim: ts=4
would work just as well.
As far as I know, you can add anything there that uses :set, so you could even do something like this:
// vim: ts=4 et noautoindent background=dark
Posted at 2005-02-20 11:36:27 by Richard • Link to Cracking Vim tip
Comments, trackbacks.
