editorconfig / editorconfig-visualstudio

EditorConfig Visual Studio Addin
http://editorconfig.org
Other
352 stars 74 forks source link

Doesn't reset to defaults when switching to a project with no .editorconfig #27

Open JRosanowski opened 8 years ago

JRosanowski commented 8 years ago

Newbie here. I'm not sure if this is a bug or to be expected. I'm using the latest version 0.5.0 with VS2015.

I set up a .editorconfig file like this for a cpp project. My default setting is 2 spaces for indents.

root = true

[*]
indent_style = space
indent_size = 4

So I open the project with the .editorconfig and it changes the indent to 4. Now I switch back to the other project using open recent and the indent size is still 4 spaces. I was expecting it to switch back to an indent size of 2. Anyone have any insight?

SamB commented 8 years ago

Something similar also happens if I'm, say, editing stuff in a project/solution with no .editorconfig and then happen to open a file or two from a directory that has a dominating .editorconfig, say visualfsharp vs roslyn; after I do that, I can very easily end up with the wrong settings. I think this can even happen if the .editorconfig would have assigned different settings to the victim file(s)!

(This would be ever so much less painful if it were possible to specify that a given section not touch the XML editor settings... or even configure the plugin to never change the indentation amount for the XML editor. Mostly because there are so very many filename extensions used for various sorts of MSBuild files ...)