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
 Align assignments
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

thelamb
New Member

Netherlands
6 Posts

Posted - Apr 09 2011 :  3:53:26 PM  Show Profile  Reply with Quote
In the power tools plugin, the following is possible:
int test = 0;
LongType test2 = 0;


After pressing a key combination, it will align the '=' characters.
int test       = 0;
LongType test2 = 0;


What I would like to see, in VA X, is an 'action' to align both the = sign, and the variable names.
int      test  = 0;
LongType test2 = 0;



I will also suggest this to the Power Tools plugin... but I thought I'd try here too, as this is basically the only feature of the Power Tools that I use.

Edited by - thelamb on Apr 09 2011 3:57:40 PM

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 09 2011 :  6:08:21 PM  Show Profile  Reply with Quote
Unfortunately we don't have any current plans to get involved in code formatting like this. To do it properly would require a very large number of options.

You might want to look into this plugin, but I have personally never used it, so I cannot say how well it works in reality:

http://www.profactor.co.uk/stylemanager.php

zen is the art of being at one with the two'ness
Go to Top of Page

thelamb
New Member

Netherlands
6 Posts

Posted - Apr 09 2011 :  6:36:42 PM  Show Profile  Reply with Quote
Ok that's too bad, but very understandable.
ProFactor looks ok, but unfortunately it has no VS2010 support.

I guess I should write something myself for this... I am quite strict about my coding style and matching up variable names is something that is annoying to do after a while, but leaving it unmatched just won't do ;).

Thanks for your time.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 11 2011 :  10:38:42 AM  Show Profile  Reply with Quote
You could try looking at:

IDE Tools menu -> Macros -> Macro Explorer

and the macro:

Samples -> VSEditor -> LineEmUp

Which has the comment description:

'' LineEmUp aligns all text in the selected lines based on word breaks.
'' Useful for creating vertically aligned variable or method declarations.

This is not a macro I use, but I did notice it when browsing the sample macros for information on how macros work

zen is the art of being at one with the two'ness
Go to Top of Page

thelamb
New Member

Netherlands
6 Posts

Posted - Apr 11 2011 :  10:53:20 AM  Show Profile  Reply with Quote
Hm, interesting. Somehow I missed that one when browsing through the samples. In combination with the Power tool align braces that is exactly what I need, thanks!

Edit:

In case anyone else has the same paranoia about code alinment.. someone on the Power Tools 'Q&A' section pointed me to this:
http://visualstudiogallery.msdn.microsoft.com/7179e851-a263-44b7-a177-1d31e33c84fd/

I have not used it yet though, but looks promising.

Edit 2:
Looks like creating a macro like the above mentioned is still easier than this plugin.

Edited by - thelamb on Apr 11 2011 11:16:41 AM
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