Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Whole-line comment indentation

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
studoot Posted - Jan 07 2015 : 03:32:50 AM
When using the 'VisualAssistX.SelectionToggleLineComment' command, comments are added at the first column of the lines. Fine - that works successfully enough.

However, aesthetically(!), I find that the behaviour of the toggle comment in Sublime Text is much preferable; it adds the line comment prefix at the lowest indentation point of the selected lines.

To illustrate, what I mean, consider commenting out the if statement in the following code:

   while (z)
   {
      if (b < 100)
      {
         a *= 2;
         b += a;
      }
   }

With Sublime Text, I get the following behaviour on selecting the if statement and toggling line comments:

   while (z)
   {
      // if (b < 100)
      // {
      //    a *= 2;
      //    b += a;
      // }
   }


With Visual Assist, I get the following:


   while (z)
   {
//       if (b < 100)
//       {
//          a *= 2;
//          b += a;
//       }
   }

I appreciate that aesthetics are a pretty subjective thing, but there you go...
7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 28 2018 : 2:18:59 PM
This is still in our list of things to do, so we have not forgotten this. We just have not gotten to this yet.

Have you considered changing the default IDE keyboard shortcut to something more easily used? You can do this in the IDE Options dialog, under the Environment -> Keyboard section. The trick here will be finding a keyboard shortcut that is convenient, that isn't already doing something useful that you use regularly.
laeus Posted - Dec 27 2018 : 12:17:23 PM
quote:
Originally posted by feline

I did not realise this was happening with VS2017 formatting, thank you for pointing it out. To stop this happening, if you are not bothered by VA putting the comments at the start of the line, turn On:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting -> Indentation -> Preserve indentation of comments



Hi, very longtime user of VAX, and I'm struggling with this myself. There doesn't seem to be an equivalent option for C#. So when I use the '/' or '*' shortcuts (which I love) and VAX puts the comment indicators "//" or "/* */" at the beginnings of their lines, then paste with formatting or insert an opening curly brace or do almost anything, that entire commented chunk slams over to the right. I'd love a VAX option that mimics the Ctrl-K,C (such an arduous key combo for something I do very frequently throughout the work day, and I'm not a fan of the alternative being to Undo every time an operation shifts a whole commented chunk over to the right).
feline Posted - Dec 23 2017 : 08:01:07 AM
I did not realise this was happening with VS2017 formatting, thank you for pointing it out. To stop this happening, if you are not bothered by VA putting the comments at the start of the line, turn On:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting -> Indentation -> Preserve indentation of comments
yurikus Posted - Dec 21 2017 : 12:13:10 PM
I would like to chime in. When VA puts comment characters at the beginning of lines, it confuses VS formatting feature and VS indents commits all the way to the "correct" indentation block, creating unsightly wall of spaces. Sorely need a fix...

accord Posted - Jan 14 2015 : 07:16:50 AM
Thank you for explaining your point of view. I have put in a feature request for a new configuration option to control indentation:

case=87353

I concur.
studoot Posted - Jan 14 2015 : 02:07:23 AM
quote:
Originally posted by accord

Are you aware that you can use ctrl+k, c to comment out and ctrl+k, u to remove the comment?



Yes, I'm aware of those shortcuts, but I prefer the VAX 'toggle comments' approach, as it's what I'm used to and (IMO) makes things easier - let the software do the thinking so I can concentrate on my code
accord Posted - Jan 13 2015 : 6:41:15 PM
Are you aware that you can use ctrl+k, c to comment out and ctrl+k, u to remove the comment? These are Visual Studio shortcuts (you need to hold ctrl and press k and c OR k and u) and I personally like the fact that I can use 2 different formatting styles: both VA and "Sublime Text" style with a different shortcut (you just need to press / with VA).

What do you think?

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