(available in EditPad Pro only)

Select Comment from the Block menu to comment out a piece of code in a source code file.

If the current file is being syntax colored by a syntax coloring scheme that contains a character string for single line comments, Block|Comment will automatically comment out the using those characters. If you've made a selection that flows along with the text, the comment characters will be inserted at the very start of the line. If you've made a rectangular selection, the comment characters will be inserted on each line spanned by the selection, at the leftmost column in the selection. This is exactly what Block|Prefix also does, except that Block|Comment automatically uses the characters to comment out something based on the syntax coloring scheme.

If the syntax coloring scheme does not define characters for single line comments, but does define characters for multi-line comments, Block|Comment will use the characters that open and close a comment on each line in the selection. If the selection is rectangular, they're inserted immediately before and after the selected columns. Otherwise, they're inserted at the start and end of each selected line.

If the current file type does not use a syntax coloring scheme, or the scheme does not define any characters to comment out something, Block|Comment will ask you for the characters to be inserted at the start of each line, just like Block|Prefix would.

If you did not select any text before using the Block|Comment command, or the selection does not span more than one line, Block|Comment will place the comment characters at the very start of the line containing the text cursor. The text cursor is then moved to the next line. If you've assigned a keyboard shortcut to Block|Comment, you can quickly comment out a bunch of lines this way.

To remove the comment characters inserted by Block|Comment, use Block|Uncomment or Block|Toggle Comment.

See also

Block Menu
Block|Rectangular Selections
Block|Toggle Comment