Page 1 of 1

Mark/unmark a block as comment

Posted: Thu Dec 04, 2003 7:11 pm
by vr8ce
The one thing I miss the most (other than FTP editing) from my old editor is the ability to mark/unmark the currently selected lines of text as comment, using the current syntax highlighting.

That is, the following lines
abc
def
ghi
jkl

would turn into
--abc
--def
--ghi
--jkl

in an SQL file that had comments set to --.

It would use SingleComment if it existed; if not, it could put CommentStart and CommentEnd at the start and end of each line, e.g.
/*abc*/
/*def*/
/*ghi*/
/*jkl*/

Choosing uncomment would remove the first comment from each line, using the same criteria as above. I'm happy for it to be "stupid", i.e. if we put spaces in front of the comment, it doesn't recognize. Whatever the easiest implementation is that would at least get the capability in there! :)

Thanks!

Posted: Thu Dec 04, 2003 10:05 pm
by CyberSlug
I hope TextPad gets this feature!

In the meantime, you can try a program I wrote
http://www.textpad.com/forum/viewtopic.php?t=4721

I also have a slightly different version posted at
http://www.textpad.com/forum/viewtopic.php?t=4534

I have some changes to add (once winter break comes), but it should be usable for you.