For IntelliJ IDEA you can use the same js code formatter xml file , but previously you have to install a special plugin Eclipse Code Formatter Plugin, which solves the problem of maintaining a common code style in team environments where both IDEA and Eclipse are used
Have you tried jsfiddler. It's great for trying things out with Javascript. Built in JSLint & something called Tidy. Not sure whether that infers jstidyPiotr Zalewa is the guy who wrote it. May be worth giving him a Tweet @zalun to confirm.
发布评论
评论(7)
这是迄今为止我遇到的最好的: http://jsbeautifier.org/
作为在线工具提供,或者在命令行上使用 node.js 或 python。
源代码已提供。
This is by far the best I've come across: http://jsbeautifier.org/
Available as an online tool, or on the command-line using node.js or python.
The source code is available.
一口气:Aptana Studio! 是的,它是基于 Java 的并且免费(Eclipse,作为独立或插件)。
您还可以自定义格式。
In one breath: Aptana Studio! Yes, it's Java based and free (Eclipse, as standalone or plugin).
You can also customize the formatting.
如果您已经使用Eclipse,我建议您尝试Aptana,您可以安装它作为 Eclipse 插件。
If you already use Eclipse, I recommend you to try Aptana, you can install it as an Eclipse Plugin.
对于 Eclipse IDE,您可以使用 JavaScript Code Formatter基于 Goolge 风格指南
对于 IntelliJ IDEA,您可以使用相同的js代码格式化程序xml文件,但之前你必须安装一个特殊的插件 ,解决了同时使用IDEA和Eclipse的团队环境中保持通用代码风格的问题
For Eclipse IDE you can use JavaScript Code Formatter based on Goolge's Style Guide
For IntelliJ IDEA you can use the same js code formatter xml file , but previously you have to install a special plugin Eclipse Code Formatter Plugin, which solves the problem of maintaining a common code style in team environments where both IDEA and Eclipse are used
如果您还需要 Java 编程,我可以推荐 'IntelliJ IDEA'
它提供了出色的 JavaScript 格式化和重构盒子的。
If you also need Java programming I can recommend 'IntelliJ IDEA'
It offers excellent JavaScript formatting and refactoring out of the box.
您尝试过 jsfiddler 吗? 它对于尝试使用 Javascript 非常有用。 内置 JSLint 和 一个叫做“整洁”的东西。 不确定这是否可以推断出 jstidy Piotr Zalewa 是它的作者。 也许值得给他发一条推文 @zalun 进行确认。
Have you tried jsfiddler. It's great for trying things out with Javascript. Built in JSLint & something called Tidy. Not sure whether that infers jstidy Piotr Zalewa is the guy who wrote it. May be worth giving him a Tweet @zalun to confirm.
如果你使用的是notepad++,你可以尝试jsminnpp插件
If you are using notepad++, you can try jsminnpp plugin