Autoformat Javascript in Netbeans IDE

梦想与她 提交于 2019-12-01 03:44:10

问题


Are there any known Plugins or ways to properly autoformat Javascript in Netbeans IDE?


回答1:


EDIT 9/15/2012

After looking into this further, I have found that the javascript module is being rewritten already(much needed). You can finally find formatting options for javascript. It's available in the netbeans nightly builds. Good luck all.

http://bits.netbeans.org/download/trunk/nightly/

I have released a pretty simple JS formatter that uses JSBeautify and runs in Rhino.

http://plugins.netbeans.org/plugin/43263/jsbeautify

You have to use an alternate key for now. I'm working on modifying the Javascript language in Netbeans to possibly release something better, later on(either as a plugin or patch). I'm still familiarizing myself with the way things are happening in Netbeans.

There have been talks for years to add more formatting options for Javascript in Netbeans. Nothing has surfaced. I'm going to propose that the Javascript language leverage JSBeautify(running in Rhino) to provide formatting, rather then implementing new features in Java. This simplifies the formatting process, plus the JSBeautify community is very large and it's actively developed.



来源:https://stackoverflow.com/questions/11096777/autoformat-javascript-in-netbeans-ide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!