Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Suggestion: don't wrap comment if comment selected

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
JonnyOThan Posted - Jun 10 2008 : 02:54:32 AM
I frequently replace a comment with another comment by using shift-home and then trying to press / to start a new comment (replacing the old one). With VAX enabled, this just wraps my old comment with /* */.

Can VAX be smart enough to realize that if my selection starts with //, pressing / shouldn't wrap the selection with a new comment? Probably a similar thing should go for /* and *.

Also, it would be useful for me to have separate checkboxes for each character in the Advanced\\General screen for "Surround selections." I appreciate the usefulness of surrounding a selection with parentheses or curly braces, but I often do the wrong thing when hitting # or / when I have something selected (I almost always want it to replace the selected text, not surround it with something).
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 12 2008 : 08:08:20 AM
One reason this happens is that surround selection with is designed to work on parts of lines, or whole lines. If you are selecting just a few words in the middle of a line you do not normally want extra EOL's added
phillipfoose Posted - Jun 11 2008 : 8:25:36 PM
quote:
Originally posted by feline

when you highlight the line how are you highlighting it? What are you actually highlighting? Just the text *without* the EOL, or are you also selecting the EOL?



I am just selecting from the front to the end of the line, if however I grab the EOL, it does what I'd expect.

It won't be hard to retrain myself to do it this way (I didn't realize it treated it differently if I grabbed an EOL or not), I just didn't think it would be useful to wrap a line with a { } and have it do it on the same line, though I suppose an inline header function might find this useful.
feline Posted - Jun 11 2008 : 08:21:13 AM
when you highlight the line how are you highlighting it? What are you actually highlighting? Just the text *without* the EOL, or are you also selecting the EOL?
phillipfoose Posted - Jun 10 2008 : 6:12:27 PM
On a somewhat similar note, let's say I have code like this:


if (something)
   statement;



If I highlight the line


   statement;


Then press "{" to wrap the block of code, it puts buth the opening and closing { }'s on the same line as statement, so I end up with:


if (something)
{   statement;}


Though I'd expect something like this, which it does if you highlight multiple lines.


if (something)
{   
   statement;
}


Thanks again for a brilliant tool.
feline Posted - Jun 10 2008 : 08:41:40 AM
I am seeing the same effect here where the line gets wrapped in /* */ comments. Thank you for the clear description.

case=17491

We do not have any current plans to add individual options to surround with, partly because this would add quite a few options. We are trying to keep the number of options in VA to the absolute minimum. Due to the way we have to hook into the IDE and work around the IDE adding options can add a lot more overhead than you would expect.

In your situation, since you normally want to replace selected text, have you considered turning off:

VA Options -> Advanced -> General -> Surround selection on / * ( { and #

and instead using the IDE's commands to comment and uncomment text? In VS2005 the default keyboard shortcuts are CTRL-K + CTRL-C and CTRL-L + CTRL-U.

The IDE's commenting and uncommenting works a little differently to VA's, but these default keyboard shortcuts are not likely to be triggered by accident while typing.

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