Code reformatting on save in PhpStorm or other jetbrains ide

后端 未结 4 369
太阳男子
太阳男子 2021-01-30 10:35

How can I set up that the code is reformatted automatically on saving?

So I don\'t always have to press Ctrl + Alt + L.

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 10:52

    From v2017.2.4 CTRL + ALT + L doesn't work. Use alt + F8 instead.

    Solution: Use: ALT + F8 to format the code.

    When creating a macro as described by Luca Mastrostefano, use: alt + F8 to format and then ctrl + alt + s to save.

提交回复
热议问题