resharpercodemaid

Can ReSharper insert/normalize regions like CodeMaid does?


I tried to clean up entire codebase with Resharper's "Default configuration with regions". But Resharper is not creating any new regions.

CodeMaid works great but I don't want to use both tools - CodeMaid & Resharper.

I am primarily using CodeMaid since it generates regions in below format, Resharper doesn't.

#region Public Properties
#endregion Public Properties

#region Public Methods 
#endregion Public Methods 

#region Private Methods
#endregion Private Methods

//...

What I am looking for is Resharper's standard configuration file that I can import and should generate regions per above format. Resharper's File Layout editor/designer is very confusing.

Can ReSharper insert/normalize regions like CodeMaid does?


Solution

  • Yes, it can.

    And, while I personally think expanding regions like that is a nightmare, here's where you set it:) enter image description here

    So, basically, you create or edit a pattern where you specify the groupings, and if you want to enclose something in a region, drag it from the toolbox, and then drop stuff into it.

    Be carefull not to overdo it, I've been there, and now I am rather using the 'remove regions' feature of auto cleanup.