codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.89k stars 355 forks source link

Feature Request - Class Fields Sorting #322

Open RealDotNetDave opened 8 years ago

RealDotNetDave commented 8 years ago

Can a feature be added to CodeMaid that will sort fields in a class by their variable name? Would help with large number of fields.

Thanks, David McCarter Microsoft MVP

codecadwallader commented 8 years ago

We have a few different ways to sort members:

  1. The reorganizing feature will group members by type and access level, and sort them alphabetically. This largely follows StyleCop rules and is customizable through our options. Note this features applies to the entire document so it will sort events, properties, etc. as well.
  2. The Spade tool window that gives a visual overview of your file has sort options in the toolbars, including Sort by type and Sort by alpha. This is good when you want to see your file in a specific way without actually changing the contents.
  3. We also have a very simple sort lines feature that will perform a basic text editor sort. This would only really apply to your scenario if you have the same access/type for all fields.
ghost commented 7 years ago

I just added a related feature request:

356 "Feature Request - Spade sorting: By type, then alphabetical (only)"

codecadwallader commented 7 years ago

@GitteHubert Thanks for the suggestion. Since this is different (albeit related) from the original question can you please split this out to a new request for clarity?