sublime中自建的有格式化按钮:web
Edit -> Line -> Reindent webstorm
只是sublime并无给他赋予快捷键,因此只需加上快捷键便可orm
Preference -> Key Bindings -user it
打开用户快捷键绑定设置添加(好比添加:ctrl + alt + l)command
{ "keys": ["ctrl+alt+l"], "command": "reindent" }, //注意不要忘记加逗号im
注:这里为了和webstorm保持一致就把格式化代码的快捷键设置成ctrl+alt+ldi