How to add format overrides in the target file (esp. for tabs)


Is there a way to override the tab settings in a specific file?

I suspect it would be similar to Atom’s “file-mode” package where you can force a file format with this…

# -*- mode: NAME -*-

…as seen in:

Also similar to VI’s modeline magic:

/* vim: set tabstop=8:softtabstop=8:shiftwidth=8:noexpandtab */

I tried searching for “tab”, “mode”, “override” and you can imagine the broad types of discussions.



See the section on language-specific configuration settings in the manual for the way to do it for all files of a type:

But there isn’t a way like vim to do it for a specific file yet.