How to surround code by curly braces in IntelliJ IDEA?

后端 未结 7 2073
予麋鹿
予麋鹿 2021-02-03 16:50

How to surround code by curly braces in IntelliJ IDEA? Is there any keyboard-shortcut for such operation?

7条回答
  •  别跟我提以往
    2021-02-03 17:49

    Add "Control flow statement without braces" to inspection settings. Then run inspection, select them in the list and then select "Apply Fix 'Add braces'".

    It just saved me a whole days tedious work!

提交回复
热议问题