Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Align assignments

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
thelamb Posted - Apr 09 2011 : 3:53:26 PM
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.
4   L A T E S T    R E P L I E S    (Newest First)
thelamb Posted - Apr 11 2011 : 10:53:20 AM
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.
feline Posted - Apr 11 2011 : 10:38:42 AM
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
thelamb Posted - Apr 09 2011 : 6:36:42 PM
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.
feline Posted - Apr 09 2011 : 6:08:21 PM
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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000