visual studio C++ toggle comment ? comment while not whole line is selected ?
Posted
by
Mr_and_Mrs_D
on Stack Overflow
See other posts from Stack Overflow
or by Mr_and_Mrs_D
Published on 2010-12-03T23:09:34Z
Indexed on
2011/01/11
19:53 UTC
Read the original article
Hit count: 147
2 questions actually :
1) shortcut to toggle comment on selected lines ? Available on all iDEs I used starting with notepad++
2)the ctrl-k, ctrl-c
exhibits this behavior (quoted from someplace nicely worded):
C#: Each line where some text is selected is commented at the line-start with double-slash. If nothing is selected, the line where the cursor is is commented.
C++: If nothing is selected or complete lines are selected, it behaves as above. However, if parts of a line are selected, and no comment is selected as part of the selection (ex. select something in the middle of a code line), then the selection is surrounded by /* and */.
since I code in C++ I find this behavior annoying - I want to be able to comment out lines partially selected - any workarounds ?
© Stack Overflow or respective owner