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
 Technical Support
 Suggestion: don't wrap comment if comment selected
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JonnyOThan
New Member

7 Posts

Posted - Jun 10 2008 :  02:54:32 AM  Show Profile  Reply with Quote
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).

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jun 10 2008 :  08:41:40 AM  Show Profile  Reply with Quote
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.

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

phillipfoose
Junior Member

USA
23 Posts

Posted - Jun 10 2008 :  6:12:27 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jun 11 2008 :  08:21:13 AM  Show Profile  Reply with Quote
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?

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

phillipfoose
Junior Member

USA
23 Posts

Posted - Jun 11 2008 :  8:25:36 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jun 12 2008 :  08:08:20 AM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness

Edited by - feline on Jun 12 2008 08:08:32 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