A lot of my XML codes contain macros that start with <macro name="****
Collapsing my codes to Level 1 will show me just this first line of the macros.
At this point, is there any way to sort these alphabetically? (i.e., sorting based on the first line of each macro)
I found this: http://milospjanic.blogspot.com/2011/05/sorting-lines-in-notepad.html
Currently thre is no concept of line chunks which you may sort by some key.
However, using sed or python script, you can prepend the key of the current tag to each line, then sort, then remove the extra keys you added prior.