Sometimes when I peek at source code, I see some headers that give some meta-information about the file eg. a revision control header with a date and ID or maybe a line like this:
# vim: ts=2:sw=2:sts=2
I recognize it immediately as settings for handling tabs in the vim editor, and I thought that it was a nice indicator of what the author of the file used when writing up the file. Actually, these modelines as they’re called are meant to be automatically picked up and used by vim. Add the following to .vimrc:
set modeline
set modelines=5
And when you open a file with the modeline, vim will take and apply those settings.
In the documentation, the modeline setting is supposedly on by default, but I found that I had to explicitly set modeline in .vimrc for modelines to be recognized. The modelines option was already set to 5 by default, though.