IDM PowerTips

Comment and Uncomment Selected Text

How many times per day do you comment out a block of code? Do you ever get tired of manually typing your open and close comments?

As of v16.00, simply highlight your code, click a button, and move on. It’s that easy…

Block Comment/Uncomment Selection

Block commenting a selection is as easy as it sounds. To comment your selection, simply highlight the block of code that you wish to comment.

Writing a Macro<br />

Now, go to the Edit menu and select Comment Selection.

Writing a Macro<br />

As you can see, the block comment characters – in this case /* and */ – have been added to our highlighted/selected block of code.

Writing a Macro<br />

To uncomment the selection, simply select the entire block of code (including the block comment characters) and go to the Edit menu and click on Uncomment Selection.

Writing a Macro<br />

As you can see, the block comment characters have been removed.

Writing a Macro<br />

Line Comment/Uncomment Selection

Not only does UltraEdit/UEStudio allow you to block comment selected text, but you can also insert line comments.

To add line comments, go to the Edit menu and select Comment Add.

Writing a Macro<br />

As you can see, the line comment characters – in this case // – have been added to our highlighted/selected block of code.

Writing a Macro<br />

To uncomment the selection, simply select the entire block of code (including the line comment characters) and go to the Edit menu and click on Comment Remove.

Writing a Macro<br />

As you can see, the line comment characters have been removed.

Writing a Macro<br />