In C-like languages (Including PHP and Java), you often have to comment out a block of text, and you can't always use the block-type comments /* */ because they don't nest. For this purpose, I have a macro, which comments out the selection, and a counterpart, which does the opposite.
To implement:
Select some lines of text.
(begin macro)
From the menu select: Search > Replace
[X] Regular expressions
Scope: Selected text
Find what: ^
Replace with: //
Press 'Replace All'
Press 'Close'
(end macro)
For the opposite:
Select some lines of text (presumably the same as above).
(begin macro)
From the menu select: Search > Replace
[X] Regular expressions
Scope: Selected text
Find what: ^//
Replace with:
Press 'Replace All'
Press 'Close'
(end macro)
I have these macros mapped to Ctrl+(The key above Tab) and Ctrl+Shift+(The key above Tab).
macro for commenting/uncommenting multiple lines
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard