Block|Uncomment

(available in EditPad Pro only)

Select Uncomment from the Block menu to remove the comment characters added by Block|Comment. When you’ve made a selection that flows with the text, Block|Uncomment skips over any whitespace at the start of each selected line to look for comment characters to remove. Comment characters after the first non-whitespace character on a line are left in place. When you’ve made a rectangular selection, Block|Uncomment only removes the comment characters if they start at the left-hand edge of the selection and are completely covered by the selection. Comment characters that start at another column or that are not or only partially selected are left in place.

If the syntax coloring scheme defines characters that start and end multi-line comments, then Block|Uncomment removes the characters that start a multi-line comment in the same way that it removes characters that start a single-line comment. On each line where it managed to remove the start of a comment it then also tries to remove the characters that end the comment. For a linear selection, Block|Uncomment skips over any whitespace at the end of the line to look for comment characters to remove. For a rectangular selection, Block|Uncomment only removes the characters that end comments if those characters end at the right-hand edge of the selection and are completely covered by the selection.

Though Block|Uncomment requires you to be a bit precise when selecting the block to be uncommented, this makes it possible to comment out blocks that already have comments in them, and then uncomment those blocks while leaving the original comments.

If only one line was selected or if there was no selection, Block|Uncomment moves the text cursor to the next line. It does this even if the current line had no comment characters to remove. This allows you to quickly uncomment multiple lines without having to select them if you assign a keyboard shortcut to Block|Uncomment.

See Also

Block menu
Block|Rectangular Selections
Block|Comment
Block|Toggle Comment