Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing settings of existing files causes some issues #177

Open
fedorenchik opened this issue Jul 13, 2021 · 1 comment
Open

Changing settings of existing files causes some issues #177

fedorenchik opened this issue Jul 13, 2021 · 1 comment
Labels
need info Need more information before proceeding

Comments

@fedorenchik
Copy link

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:

  1. When opening a file user do not know real line ending of the file (set ff? would always return unix)
  2. 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).

@cxw42 cxw42 added the need info Need more information before proceeding label Jul 17, 2021
@cxw42
Copy link
Member

cxw42 commented Jul 17, 2021

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need info Need more information before proceeding
Projects
None yet
Development

No branches or pull requests

2 participants