Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Sorting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MotorViper
New Member

2 Posts

Posted - Mar 26 2010 :  10:46:09 AM  Show Profile  Reply with Quote
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.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 26 2010 :  6:02:17 PM  Show Profile  Reply with Quote
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).

Edited by - accord on Mar 26 2010 6:11:28 PM
Go to Top of Page

HBTeun
Senior Member

33 Posts

Posted - Apr 08 2010 :  06:12:34 AM  Show Profile  Reply with Quote
I'm not sure if this is possible, but I would like a option to sort cases from a switch case and not change the code inside the case.

It's probably possible through the VA Outline.

Also I would love to have the sort option in the right click context menu.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 12 2010 :  12:22:09 PM  Show Profile  Reply with Quote
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:

Tools -> Options -> Environment -> Keyboard

Here find VAssistX.SortSelectedLines
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000