Tabs & Spaces

Seems like StyleCop wants regions to be indented by spaces, and not tabs. I got this request from like 12 different users, and barryd was kind enough to do the work for me.

It took me about 4 months to commit the patch, sorry guys :-)

You can now choose between tabs or spaces as your indentation character. This should be available in the next release (v0.7.3.0), but is already available in the trunk and nightly build.

Did I mention I really love the fact that now, whenever code is committed, it can be immediately downloaded and installed?

 

This entry was posted on Friday, March 13th, 2009at 7:13 pm and is filed under Public Beta, What's New, v0.7, v0.7.3.0. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response or trackback from your own site.

 

6 Responses to “Tabs & Spaces”

  1. [...] I have just updated the assembly and code layout schema versions to v0.7.3.0 (which will be the next major release), so if you are using the nightly build, make sure you update your custom code layouts to point to v0.7.3.0. I have made this version change since the v0.7.3.0 schema includes the ability to choose between tabs and spaces. [...]

    Posted by Regionerate’s Development Blog » Blog Archive » Some Thoughts on Versioning (And v0.7.3.0) on March 14th, 2009 4:45 pm

  2. Personally, I don’t think there should be an option for this. You should simply fall back on what’s configured in VS. If VS is configured to use tabs, use tabs; if it wants spaces, use spaces. I abhor spaces for indentation, but what I hate worse is having to save that (or any) setting in multiple places.

    Posted by Michael Flanakin on March 14th, 2009 5:04 pm

  3. Michael,

    I agree, that does sound like the correct solution for the problem.

    However, since Regionerate can run under other environments (such as NAnt, SharpDevelop and command line), it would be hard to provide a solution that will be applicable to everyone. For this reason, Regionerate has no ability to query Visual Studio settings.

    I would really like to keep the Visual Studio Add-in from modifying code layouts, so I think that the way this should be solved is with a custom installation script, that will simply ask the user if he wants to import Visual Studio settings.

    Feel like contributing? :-)

    Posted by rauchy on March 14th, 2009 5:15 pm

  4. I have made some chages to the Tabs&Spaces, and the multiple single lines between regions.
    Today I chaged your RegularExpression about the Field, and now the event statement like :
    ///
    /// OCcurs when any mouse button is up.
    ///
    private event WinForm.MouseEventHandler m_RenderViewMouseUp = delegate { };
    can be placed into the specific region.
    Previouly, It can’t be placed into any region defined in my codylayout.xml.
    The new RegularExpress about the Field is as below:

    (?\A\s*(?:(?:(?(?://.*\n)|(?:/\*(?:[\w\d!@#$%^&*()\[\],.;\\”‘:|{}`~+=-_?\s]*)?\*/))|(\[\s*(?\w*)[^\[\]]*?\]))\s*)*?(?:(?:(?protected\s+internal|internal\s+protected|private|public|protected|internal)|(?new|override)|(?const)|(?event)|(?static)|(?volatile)|(?readonly)|\s)*)?(?\w+(?:[\w,.\?\[\]])*?(?:\)*?)\s+(?(?:\w\*\.*\d*)+?)\s*(?:\=(\s*((?:[^"])|(“.*”))*?)|(\s*delegate.*?\{.*?\}))?;)

    Posted by Sally on April 17th, 2009 11:08 am

  5. Sally,

    Thank you for your effort.

    I have already replied to you on another blog post and mentioned that I would really prefer having this discussion in the community forums.

    Anyway, I have opened a ticket for this, you can access it here: http://trac2.assembla.com/Regionerate/ticket/52

    rauchy

    Posted by rauchy on April 19th, 2009 9:47 am

  6. Fixed.

    – rauchy

    Posted by rauchy on April 19th, 2009 10:11 am

 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>