Is it possible to make sorting sort on something other than the whole line. For instance sorting a list of variable declarations by variable name rather than type. i.e. :
int a double c int b
would go to:
int a int b double c
The code can be considered to be in columns and sorting done by column number.
Currently it is not possible to do it automatically.
However, are you aware of VA Outline?
VAssistX -> Tools -> VA Outline
You can reorder any item by drag-and-drop.
Also, we have an improvement request to sort selected text based on the last word / symbol on the line:
case=32391
which seems good for you, considering your examples.
Reordering by columns can be tricky considering the edge cases: not everybody uses TABs to separate the variable types and names, and maybe you will need to use more TABs on specific lines and there are types in C++ which contains space (e.g. unsigned int).
You cannot sort switch cases, and VA outline only works on global symbols and members, you cannot rearrange a funtion like this. Placing too many things to the context menu could clutter the menu.
However, you can assign a key shortcut to this feature if you use it frequently: