editorconfig-visualstudio icon indicating copy to clipboard operation
editorconfig-visualstudio copied to clipboard

Restore global settings

Open ygoe opened this issue 9 years ago • 6 comments

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.

ygoe avatar Apr 27 '15 13:04 ygoe

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

jednano avatar Apr 27 '15 17:04 jednano

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!

jednano avatar Apr 27 '15 17:04 jednano

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).

ite-klass avatar May 21 '15 06:05 ite-klass

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 avatar May 21 '15 16:05 jednano

Specifically, it happens in the Settings folder

jednano avatar May 21 '15 16:05 jednano

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..

mterwoord avatar May 22 '15 09:05 mterwoord