Changing settings of existing files causes some issues
When working on multiple new and existing projects automatic changing of settings can get in a way.
For example, I want new projects use settings from $HOME/.editorconfig, and existing projects (which maybe without any local .editorconfig file) keep existing settings (specifically, fileformat).
Let's say, in $HOME/.editorconfig:
end_of_line = lf
and existing projects has dos-style line endings.
Then, automatic changing of fileformat has 2 problems:
- When opening a file user do not know real line ending of the file (
set ff?would always returnunix) - It is impossible to change line ending of a file from within vim (without some hackery, such as
set ff=dos | set ff=unix)
Maybe other settings have the same issue (such as insert_final_newline).
Thus, I propose to not change settings of existing files (or at least don't set settings from .editorconfig where root = true).
@fedorenchik thanks for using the plugin and reporting! I think you are saying that, in some cases, if you add a .editorconfig to a project but the files in that project don't match the settings in the .editorconfig, the plugin doesn't make Vim change those files. Is that correct or not?
To help us understand the problem:
- Would you please upload a .zip and instructions for a small test case that shows the issue?
- What OS, OS version, Vim, Vim version, plugin version, and (if using an external core), core and core version?
Much appreciated!