How to auto format code in WebStorm?

前端 未结 5 449
执笔经年
执笔经年 2021-01-30 00:43

I\'m looking for a way to auto-format my code in the WebStorm IDE?

5条回答
  •  一个人的身影
    2021-01-30 01:22

    "Save Actions" plugin can format code when saving.

    1. Install plugin:

      File -> Settings -> Plugins -> Browse repositories;

      • input keyword "Save Actions" install
      • restart the IDE.
    2. Config plugin:

      File -> Settings -> Other Settings

      • check "Format file" option.

提交回复
热议问题