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
 1543: comment lines + extra space
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bugfix
Tomato Guru

Germany
324 Posts

Posted - Jan 16 2007 :  09:03:18 AM  Show Profile  Reply with Quote
since some recent 15xx build 'VAX comment lines' started adding an extra space between // and code to be commented.
this is pretty annoying because its incompatible w/ IDEs built in comment/uncomment feature and hence breaks code formatting.
please change it back to old behavior or make it an autotext entry so one can adjust the format.

-bugfix

http://www.mf-sd.de

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jan 16 2007 :  09:41:26 AM  Show Profile  Reply with Quote
From memory it has been this way for a long time.
The IDE's comment / uncomment is already incompatible with VA's comment / uncomment feature. We recommend you use one or the other.

If you take this piece of example code:

static void testComment(int foo /* = 0 */)
{
}


select all three lines and press '*' to comment this with VA the /* */ comment on the parameter is modified so the whole three lines are correctly commented out.

When you uncomment these lines VA undoes this, returning the inner comment to how it used to be.

This is one reason for sticking with VA's commenting / uncommenting, since it knows how to undo its self.

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

bugfix
Tomato Guru

Germany
324 Posts

Posted - Jan 16 2007 :  11:21:52 AM  Show Profile  Reply with Quote
im not talking about block commenting and i've disabled surround selection because it's foobar imho:)
iirc the "breakage" has been introduced in 153x.

void foo()
{
    foo1();
    foo2();
    foo3();
    foo4();
}

i often do smth like this while tracking down bugs:
select foo1..4, use vax "comment LINES" (often via context menu) and then start uncommenting from top w/ delete key.
now i have to take into account that stupid extra space or i'll loose code formatting.
anyways whats the purpose of that extra space? if you start writing documentation using line comments you type // while writing anyways and if you want a space after those // you just type it as well.

http://www.mf-sd.de
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jan 16 2007 :  1:09:49 PM  Show Profile  Reply with Quote
Personally I don't know why the space is there, but I suspect it is to help readability when commenting code that starts at column 1.

Do I even want to ask why you don't like VA's surround selection? This is the feature I would recommend for un-commenting this code.

Personally when doing this sort of this I would change the code to read:

void foo()
{
#if 0
    foo1();
    foo2();
    foo3();
    foo4();
#endif
}


and then use ALT-SHIFT-T to move the "#if 0" line down one line at a time. I have settled on this after trying various other methods, and for me it is the best solution, since it is simple, fast, easy and reliable.

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

bugfix
Tomato Guru

Germany
324 Posts

Posted - Jan 16 2007 :  1:49:32 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline


Do I even want to ask why you don't like VA's surround selection? This is the feature I would recommend for un-commenting this code.


simple: select some part of xpath, regexp, math expression and try replacing it w/ / or * . what happens it gets commented which is last thing i want:)

quote:

Personally when doing this sort of this I would change the code to read:

void foo()
{
#if 0
    foo1();
    foo2();
    foo3();
    foo4();
#endif
}


and then use ALT-SHIFT-T to move the "#if 0" line down one line at a time. I have settled on this after trying various other methods, and for me it is the best solution, since it is simple, fast, easy and reliable.


well everyone has developed it's work flow over the years which are not easily changed. stupid habit of humans i guess:)

the thing is adding new features is a nice thing but changing behavior which was there for years i consider a bad thing esp. if there is no option to turn on old behavior, like the curly bracket thing.
just my 5 cents

http://www.mf-sd.de
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jan 16 2007 :  2:37:43 PM  Show Profile  Reply with Quote
I am a great believer in regular expressions, but I hardly ever seem to use them in my code. Probably to do with the types of code I write *shrug*. This is a solid reason for avoiding surround selection.

I have put in a feature request for this to see what the developers think of it.

case=4570

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

bugfix
Tomato Guru

Germany
324 Posts

Posted - Jan 16 2007 :  3:19:30 PM  Show Profile  Reply with Quote
thanks a lot

http://www.mf-sd.de
Go to Top of Page

bugfix
Tomato Guru

Germany
324 Posts

Posted - Feb 01 2007 :  3:40:30 PM  Show Profile  Reply with Quote
i just found another issue w/ vax comment lines (regardless of customized version:P)

select some lines, uses vax comment lines, indent w/ tab.
now try using vax uncomment lines, its disabled!
so one either has to unindent before using vax uncomment lines or using IDE built in uncomment lines which borks formatting due to the extra space vax has inserted.

http://www.mf-sd.de
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Feb 02 2007 :  12:28:40 PM  Show Profile  Reply with Quote
True, I have been running into this myself every now and then for ages. Normally it only effects me after copy / paste a block of code, since I have format after paste turned on, and the comments get indented.

I suppose this means I cannot blame your modified version of VA either

case=387

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

support
Whole Tomato Software

5566 Posts

Posted - May 31 2007 :  01:13:48 AM  Show Profile  Reply with Quote
case=4570 implemented in build 1557
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jun 02 2007 :  09:43:24 AM  Show Profile  Reply with Quote
FAQ entry describing the new registry key is here:

http://docs.wholetomato.com?W359

zen is the art of being at one with the two'ness
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