473,395 Members | 1,383 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

C# IDE - commenting / uncommenting

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

Mar 28 '07 #1
6 1986
Zytan wrote:
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
Apr 1 '07 #2
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
Apr 1 '07 #3
Zytan wrote:
>>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.
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
Apr 1 '07 #4
Zytan wrote:
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
Apr 1 '07 #5
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

Apr 1 '07 #6
Zytan wrote:
>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.
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
Apr 2 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: LRW | last post by:
OK, this is probably an odd, but esy question. =) I taught myself PHP from a Julie Meloni book and newsgroup questions. So, I don't think I've really learned the proper way of organizing and...
19
by: qazmlp | last post by:
I hope comp.lang.c will not find the following question as a complete off-topic. I would like to remove ie.comment out the 'cout' statements during compilation(actually preprocessing) time. ...
46
by: Profetas | last post by:
Hi, I know that this is off topic. but I didn't know where to post. Do you comment your source code while coding or after coding. for example: you write a procedure and after it is...
4
by: Ron McNulty | last post by:
Often when testing an app, I want to temporarily comment out sections of the App.config file. Is there any way to do this? Regards Ron
3
by: Naveen Mukkelli | last post by:
Hi All, I'm trying to create XML commenting for my code using XML commenting feature for the first time. I'm using VS.NET 2003 and C#. I'v tried the following way. Step 1: set the file name...
18
by: Marian F. | last post by:
The 12 years old genius function to count english words in a sentence: ' This is my function to count english words in your string ' s is the string with your words to be counted ' Returns an...
8
by: lallous | last post by:
Hello I've been programming for a number of years, however my commenting style is always different. Sometimes I use something like: /************************ * method .... * comments......
2
by: RYoung | last post by:
Can someone point me to a reference concerning source code commenting with VB 2005, ala C# commenting? I googled and found alot of links to add-ins and commercial products, but I can't find any...
1
by: Wijaya Edward | last post by:
Hi all, I have the following code: import sys import re ham_count = 0 spam_count = 0
100
by: Angel Tsankov | last post by:
Can someone recommend a good source of C/C++ coding style. Specifically, I am interested in commenting style and in particular how to indent comments and the commented code, rather than when to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.