editorconfig / editorconfig-visualstudio

EditorConfig Visual Studio Addin
http://editorconfig.org
Other
355 stars 75 forks source link

Restore global settings #18

Open ygoe opened 9 years ago

ygoe commented 9 years ago

I've seen in the code that for certain functions to work properly the application's global editor settings must be changed for the currently focused document. I haven't seen any code that restores these settings though. The EditorConfig website states that anything unspecified in the .editorconfig file is handled as configured by the user. This fallback configuration seems to be irreversibly manipulated as soon as a document is opened that is under control of a .editorconfig file.

Did I miss something or is the restoration of modified settings really missing? If not, maybe a note could be added to the ApplyGlobalSettings method.

jednano commented 9 years ago

You definitely missed something. The original settings are restored when you tab-out or close a tab.

jednano commented 9 years ago

At least, that's how it worked in the past. I'm not sure how that feature was destroyed. I'll have to take a look into it!

ite-klass commented 9 years ago

I tested with VS2013 and am able to confirm that indeed the settings are not restored when closing a file, that on opening set a indendation setting (language Tabs settings).

jednano commented 9 years ago

Yep. My memory is so bad. The one that restored the settings came from a branch I had here: https://github.com/jedmao/editorconfig-visualstudio/tree/enforce

jednano commented 9 years ago

Specifically, it happens in the Settings folder

mterwoord commented 9 years ago

Can we place have the setting restore option? Right now closing VS and opening means the global settings of the last .editorconfig stay active, meaning that a project without an editorconfig might look weird..