istoph / editor

The chr terminal editor is inspired by the turbo pascal editor using Turbo Vision from the year 1997. For the keyboard shortcut he should be similar gedit, to facilitate the transition from desktop to console editor.
Boost Software License 1.0
35 stars 3 forks source link

Different configuration settings per file #15

Open bziemons opened 1 year ago

bziemons commented 1 year ago

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)