C# IDE - commenting / uncommenting

  • Thread starter Thread starter Zytan
  • Start date Start date
Z

Zytan

Ctrl+E, C and Ctrl+E, U will comment and uncomment out multiple
lines. However, it has two issues:

1. It will not include the // for empty lines, which makes it hard to
'see' that one group is altogether commented out. Since programmers
very often use spaces to improve readability, this happens often.

2. It converts tabs into spaces. I default to using tabs. This is
not so bad if you uncomment with the shortcut (or button) since it
replenishes the tabs. But, if you do it manually, you're stuck with
spaces. I've finally determined where those damn spaces are coming
from.

Are there any solutions to these issues?

Zytan
 
Zytan said:
Ctrl+E, C and Ctrl+E, U will comment and uncomment out multiple
lines. However, it has two issues:

1. It will not include the // for empty lines, which makes it hard to
'see' that one group is altogether commented out. Since programmers
very often use spaces to improve readability, this happens often.

2. It converts tabs into spaces. I default to using tabs. This is
not so bad if you uncomment with the shortcut (or button) since it
replenishes the tabs. But, if you do it manually, you're stuck with
spaces. I've finally determined where those damn spaces are coming
from.

Are there any solutions to these issues?

/*
....
*/

:-)

Arne
 
Are there any solutions to these issues?
/*
...
*/

:-)

:)

Actually, even that has a problem! Sometimes I just want to type /*
and scroll down and type */, and then when I do, I always put it on
its own line and line them up. So, at the end, I press enter, it
starts typing in * for each line for me! (For this style:
/*
*
*
*/
Which I don't use.) So, the automatic * creation makes it a pain to
make */ line up as I want it, rather than how it wants it.

Zytan
 
Zytan said:
:)

Actually, even that has a problem! Sometimes I just want to type /*
and scroll down and type */, and then when I do, I always put it on
its own line and line them up. So, at the end, I press enter, it
starts typing in * for each line for me! (For this style:
/*
*
*
*/
Which I don't use.) So, the automatic * creation makes it a pain to
make */ line up as I want it, rather than how it wants it.

If I in VS 2005 Express set the /* first and go down and make
*/ on a separate line I get an extra "* " that does not break
anything but does not look good.

But if I set the end */ first and the /* last it seems to work.

Arne
 
Zytan said:
Ctrl+E, C and Ctrl+E, U will comment and uncomment out multiple
lines. However, it has two issues:

1. It will not include the // for empty lines, which makes it hard to
'see' that one group is altogether commented out. Since programmers
very often use spaces to improve readability, this happens often.

2. It converts tabs into spaces. I default to using tabs. This is
not so bad if you uncomment with the shortcut (or button) since it
replenishes the tabs. But, if you do it manually, you're stuck with
spaces. I've finally determined where those damn spaces are coming
from.

Are there any solutions to these issues?

Another approach is:

#if THISISNEVERTRUE
....
#endif

Arne
 
Another approach is:
#if THISISNEVERTRUE
...
#endif

Thanks for your suggestions. But, these just aren't as convenient as
these buttons are, and could never be, unfortunately (unless we fixed
the code that the buttons triggered, somehow). So, i'll just deal
with it.

Zytan
 
Zytan said:
Thanks for your suggestions. But, these just aren't as convenient as
these buttons are, and could never be, unfortunately (unless we fixed
the code that the buttons triggered, somehow). So, i'll just deal
with it.

I believe you can write plugins to VS, so if you really needed
it then you could possible write such.

Or just learn to live with like the other millions of VS users.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top