Netbeans PHP - Add / Remove Plugin / Shortcut Curly Braces

I really like short expressions if expressions without curly braces (PHP) like

if ($x === $y) echo $z; 

If I want to add multiple lines (maybe just temporarily for debugging), I need to manually add curly braces. Is there a plugin for netbeans that does this with a shortcut, something like "toggle (add / remove) previous expressions"

+1
source share
1 answer

The best solution I got now is two macros

Add braces:

 caret-end-line caret-begin-line "{" insert-break 

Remove curly braces:

 caret-up caret-end-line remove-word-next selection-match-brace cut-to-clipboard remove-line remove-word-previous insert-break paste-from-clipboard caret-up caret-end-line 

The cursor position should be in the line of code that I want to add / remove curly braces.

+1
source

All Articles