如何在WebStorm中重新格式化JavaScript代码? [英] How can I reformat JavaScript code in WebStorm?

查看:330
本文介绍了如何在WebStorm中重新格式化JavaScript代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JetBrains WebStorm IDE。但我认为autoformat(美化)代码没有捷径。在Netbeans中,其 Ctrl Shift F 命令格式化整个文件。这有什么命令吗?我是否需要安装任何插件或其他东西来启用此功能?

I am using JetBrains WebStorm IDE. But I think there is not shortcut to autoformat (beautify) the code. In Netbeans, its CtrlShiftF command which formats the whole file. Is there any command for this? Do I need to install any plugin or something to enable this function?

推荐答案

代码 | 重新格式代码... Ctrl + Alt + L ):

Code | Reformat Code... (Ctrl+Alt+L):

可以在文件 |中更改键盘快捷键设置 | Keymap

Keyboard shortcut can be changed in File | Settings | Keymap:

如果您还不熟悉IDE功能,请使用帮助 | 查找行动

If you are not familiar with IDE features yet, use Help | Find Action:

功能也有记录

这篇关于如何在WebStorm中重新格式化JavaScript代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆