WebStorm format code on type

时间:2017-06-09 12:40:27

标签: intellij-idea formatting refactoring webstorm jetbrains-ide

I have found this question with no apparent working answer to it here.

Can WebStorm automatically format the code when I am writing?

I basically have the exact same question. Really handy feature even in VSCode, saves a lot of time pressing the format shortcut.

Does anyone have an idea how to enable it if even possible?

2 个答案:

答案 0 :(得分:2)

Settings | Editor | General | Smart Keys中启用在键入'}'时重新格式化阻止时,在输入'} '时会自动重新格式化随附的代码块;

重新格式化添加分号尚未实施,请投票给IDEA-122070

答案 1 :(得分:1)

WebStorm can't automatically format the code when you are writing . visit the page to get detail about code format in Webstrome Visit page