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


#1

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: https://atom.io/packages/file-mode

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.

Thanks,
Peter


#2

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

https://atom.io/docs/latest/using-atom-basic-customization#language-specific-configuration-settings

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