Rearrange and/or format only selected
Brought to you by:
ernestpasour
It would be nice if rearrange and format worked as is if nothing was selected, but if selected would only rearrange or format that portion of code.
Example: Select a group of properties, and then only rearrange or format those properties.
This would be helpful for alphabetizing a group of properties, but not necessarily moving the block of code. Or formatting a particular line but avoiding formatting another.
Formatting should already work this way. There are some difficulties occasionally with not being able to properly match the original lines with the formatted lines, but for the most part it should work (to line granularity). There are also certain things that only apply when the entire file is formatted (notably adding/removing braces)
However, all of the rearranging stuff only works on the full file. That code is very tricky and I decided that was a reasonable limitation. How often have you found yourself wanting this capability?