Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2246 Change behaviour of toggle comment feature. Should not toggle line-by-line.

Next_Release
open
nobody
None
5
2013-01-11
2013-01-11
Lars Ruoff
No

A frequent use is to toggle comments to temporarily disable a selected code block.
The problem is that the code block can itself contain comments.
It seems that the toggle comment features works by toggling comments line-by-line:

code
code
# This is a comment
code
code

which with the current toggle implementation transforms to:

#code
#code
 This is a comment
#code
#code

which is rarely helpful.
It would make more sense that the result would be:

#code
#code
## This is a comment
#code
#code

for obvious reasons.
Toggling again must transform the snippet to its original form of course.

Discussion