Uncomment Block

The Uncomment Block item is available via the Reformat Text button on the collection toolbar and via the Format menu, except when the Recycle Bin tab is active.

Uncomment Block removes the comment characters added by Comment Block. 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, Uncomment Block 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 clip’s 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, Uncomment Block skips over any whitespace at the end of the line to look for comment characters to remove. For a rectangular selection, Uncomment Block 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 Uncomment Block 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 then Uncomment Block 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.