SLaks / Rebracer

Saves editor formatting settings as part of each solution.
http://visualstudiogallery.msdn.microsoft.com/410e9b9f-65f3-4495-b68e-15567e543c58
44 stars 15 forks source link

Add 'Tabs' indentation settings support #16

Closed ite-klass closed 9 years ago

ite-klass commented 9 years ago

Please add support for indentation settings (sharing on a per-solution basis).

Editorconfig seems to be advertised as an alternative to this, but its not.

The editorconfig plugin specifies indentation settings on a per-file level rather than per-language as VS does. Hence, it can not be a complete replacement.

Furthermore, we’re using ReSharper to format code, which in turn uses the VS settings. So we actually need the VS settings to be set up to what we want it to be.

And worse still, does one of

With all these problems editorconfig is not a viable alternative. What we would actually need is Rebracer to support the Tabs settings.

SLaks commented 9 years ago

You can manually add tabs settings to your Rebracer.xml, as mentioned in the Readme.

Once you add that section, Rebracer will handle the setting like any other setting.

ite-klass commented 9 years ago

Ah, I didn’t find that when searching for indent. Thanks.

SLaks commented 9 years ago

Note that editorconfig can also specify settings per-language; just use **/*.xml.

ite-klass commented 9 years ago

Huh? Like [**/*.xml]? Is this a VS plugin specific hack? Is that documented anywhere?

Why would it not just be specific to files ending in .xml then?

The editorconfig VS plugins issues of applying only on opening files, and leaking the setting (not resetting; bug) still persist.

SLaks commented 9 years ago

You want to apply to all XML editors, regardless of extension? I misunderstood.

CADbloke commented 8 years ago

https://gist.github.com/CADbloke/6206b1d4084a88473689 is a list to add for all the indents.

macinta commented 8 years ago

@SLaks I think the FAQ entry on this has a typo. There's currently a "name" attribute in the closing "ToolsOptionsSubCategory" tag. The setting didn't work for me until I removed that attribute.

Also, I think I prefer using Rebracer for managing indentation over Editorconfig because Editorconfig (from what I've read) changes the global settings and leaves them that way. The downside to that is that you have to create an Editorconfig settings file for every project then, otherwise opening the one oddball project which uses different settings will change the defaults used by any project that follows. I like how Rebracer allows you to keep the global defaults.

macinta commented 8 years ago

Hmmm, I guess I spoke too soon. It seems that my VS defaults do get changed when using the "InsertTab" XML from the FAQ. I assume that's because it's a manual entry.