Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Proper indenting of ternary ?:

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
charleyb Posted - Sep 18 2011 : 09:24:28 AM
I *love* Visual Assist X, and recognize what it's doing (parsing and formatting) is incredibly difficult.

WISH: Proper indenting of ternary ?:

Example:

(The following example does not currently format properly, as the "some_false_value" is not indented) (Visual Assist X 10.6.1856.0 built 2011.08.24):

void foo(void)
{
  return
    (some_long_condition)
    ?
    some_true_value
    :
    some_false_value;
}


It would also be fine if (alternatively) the resulting values were indented (we don't have a preference):

void foo(void)
{
  return
    (some_long_condition)
      ?
      some_true_value
      :
      some_false_value;
}
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 19 2011 : 2:38:35 PM
Unfortunately VA does not do code formatting its self, we simply ask the IDE to do the code formatting, and rely on your IDE settings for this. This FAQ entry links to a couple of different code formatting tools that you might want to look into:

http://docs.wholetomato.com?W147

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