How do I embed Vim settings directly in a file so they apply automatically when it is opened?
# vim: set tabstop=2 shiftwidth=2 expandtab :
A modeline is a specially formatted comment that Vim reads when it opens a file and applies as local settings — no plugin or project-level vimrc required.