Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: Anonymous on June 30, 2005, 03:59:21 pm
-
I personally don't always find it particularly useful to toggle comments, in the way that the "[ctrl]+[shift]+[c]" shortcut currently works. If one wishes to temporarily comment a block of code, also containing some lines which are natural language comments, the original comments become uncommented, and one has to go through more manually adjusting things.
The way the Eclipse editor, for instance, works, is that there are separate shortcuts to comment and uncomment the selection. These work quite similarly to indent / unindent, so "//" style comments are added to, or removed from the beginning of lines accordingly.
Perhaps it is good programming practice to avoid these kinds of situations as much as possible. However, for a relative newbie such as myself, I do find myself wanting to quickly test (or attempt to compile :oops:) a program with a chunk of code removed quite often.
It should be a trivial modification, if any of the devs finds some time to implement it, I think it would be a worthwhile improvement.
-
The (un)commenting feature was contributed by a user early enough, so it was better to have it than nothing ;)
A feature request exists for this and will be implemented, probably before the next update.
Yiannis.
-
Excellent news. In future if I have any feature requests, I'll use the designated form.
Thanks, as always, for the great work you're doing.
-
I did the necessary modifications to Code::Blocks (CVS version), it now has two new commands in the "Edit" menu: "Comment" and "Uncomment". The old "Comment / uncomment" command was renamed to "Toggle comment". I took the code of the original commenting function and made two new functions out of it, so the code should be pretty stable.
How can I contribute the code to C::B?
-
Submit a patch at sourceforge...
-
Okay, did it. I hope it will be of use for you, it's my first contribution to C::B :)
-
Okay, did it. I hope it will be of use for you, it's my first contribution to C::B :)
Thanks a lot. Keep 'em coming :lol:
Yiannis,