Posted by & filed under Tips.

Sometimes you ‘inherit’ code that may not be as “pretty” as you would like it, but taking the time to fix these little things could be very time consuming. Understand helps with a ‘reindent’ option and a ‘sort’ option.

messyFunctionHere you can see that these lines are not lined up like most of us would like.

The quick fix is to highlight the text and select ‘Reindent Selection’.



The results are quick with a correctly indented piece of code.   goodFunction



Sometimes we just want a little organization and want things to be alphabetized. Highlight the text, right click and select ‘Sort Selection’ in the context menu.



The result is an alphabetized list that can make the pickiest person happy.

notSorted     sorted