Sounds good to me. I'm interested to see how the new toggle comment behaviour ('//~' and '#~') works out in practice.
Me too ;-). I'm going to start implementing it.
Done in SVN r1668 (also fixed some selection issues).
Forgot to mention: Keyboard shortcut for comment toggling was changed to: Ctrl-E. Shortcuts for comment/uncomment are now undefined.
Interesting behaviour you gave it regarding lines that already had a comment character on them. (That is, it doesn't touch them.)
When I comment out a block, I'd like to be able to still glance up at it while working. Sometimes I'm trying out a different algorithm, and I still like to look up at the commented-out block for inspiration. So, for me, the commented-out block still needs to be readable.
If I had the following block:
def foo(self): # Do it how the so-and-so wants it. self.thus_and_so()
# And then, make sure resources get deallocated. self.tidy_up()
I'd prefer to get:
#~ def foo(self): #~ # Do it how the so-and-so wants it. #~ self.thus_and_so() #~ #~ # And then, make sure resources get deallocated. #~ self.tidy_up()
rather than:
#~def foo(self): # Do it how the so-and-so wants it. #~ self.thus_and_so()
# And then, make sure resources get deallocated. #~ self.tidy_up()
(Note, for increased readability, the commenting would provide:
1. extra space after "#~", 2. blank lines get commented too, and 3. comment lines without special marker get commented with special marker.)
I'm glad that commenting out the block makes the computer not need to read it, but *I* still do! :)
By the way, since Ctrl-B is no longer mapped to a commenting command, it seems like a natural fit for "Goto matching brace" (which is currently not mapped to a key combination).
---John