Are there any known Plugins or ways to properly autoformat Javascript in Netbeans IDE?
Choose Tools | Options. Click Editor in the left panel and select the Indentation tab. Adjust the properties for the indentation engine to your taste.
Displaying JavadocFrom the menu bar, select Window > IDE Tools > Javadoc Documentation to open the Javadoc window, in which the documentation is refreshed automatically for the location of your cursor.
Shift + Alt + F indents the whole file. Save this answer. Show activity on this post. Select the lines you want to reformat (indenting), then hit Alt+Shift+F.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With