Netbeans PHP - add/remove curly braces plugin/shortcut

前端 未结 1 1214
后悔当初
后悔当初 2021-01-25 10:10

I love short if statements without braces (PHP) like

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

If I want to add a few lines (maybe just temporary for debugging

相关标签:
1条回答
  • 2021-01-25 10:13

    The best solution I got for now are two macros

    Add Curly-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
    

    Cursor position has to be in the line of code I want to add/remove braces.

    0 讨论(0)
提交回复
热议问题