editor icon indicating copy to clipboard operation
editor copied to clipboard

Different configuration settings per file

Open bziemons opened this issue 2 years ago • 0 comments

While I wouldn't want anything like vim's modeline in my files, I think it makes sense to have a user- or system-wide configuration file that specifies options like tab width and tabs/spaces per file name and/or file path. As an example, I am thinking of something like this:

/etc/chr/filesettings

*.yaml,*.yml tab=false tabsize=2

$XDG_CONFIG_HOME/chr.filesettings (or a chr folder instead)

/path/to/project/*.py tab=false tabsize=4
*.cfg tab=true tabsize=8

(additionally having an option to save the currently applied formatting options that deviate from the defaults/config to the latter file, referencing the currently opened file by it's full path, if applicable)

bziemons avatar May 07 '23 10:05 bziemons