Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sort "usings" directive by ReSharper Clean-up

Tags:

How to setup ReSharper to call "Sort usings" in class?

like image 600
szkra Avatar asked Nov 09 '11 09:11

szkra


2 Answers

I will answer for my question.

Using shortcut from Resharper it's not best solution. Nice tool is CodeMaid it makes few nice cleanup's when saving file like with no shortcut key press:

  • sorting usings alphabetically and remove unused
  • deleting empty lines

This tool is complement for Resharper.

like image 180
szkra Avatar answered Oct 14 '22 03:10

szkra


Resharper (9) will sort usings if you run Code Cleanup, via menus or keyboard shortcut CTRL+E, CTRL+C

like image 42
Fredrik Stolpe Avatar answered Oct 14 '22 01:10

Fredrik Stolpe