views:

526

answers:

2

There are a couple JavaScript modes out there:

Does anyone have a recommendation on which to use?

+8  A: 

There's also espresso-mode.

A note from the espresso-mode homepage:

Espresso has been incorporated into GNU Emacs starting with version 23.2 and has been renamed js-mode.
jlf
+1 espresso-mode is much better for navigating around functions (`C-M-a` and `C-M-e`) than js2-mode. The author also actively responds to issue requests unlike js2-mode
seth
Good to know. I was ready to pull the trigger on js2-mode but now I have to rethink it.
Cheeso
+4  A: 

I use js2-mode for JavaScript authoring, and it's excellent. It's not ideal for JavaScript-like languages, though (ActionScript), so it's good to have a simple mode around as a backup for those cases.

nullptr
So JavaScript is not "JavaScript-like"? Do you mean to say "non-JavaScript languages that are similar to JavaScript"?
Chris Conway
Conway, everyone else understood what mr unknown was saying. give him a break.
Cheeso
js2-mode already included into GNU Emacs tree, and will released as part of GNU Emacs 23.2
Alex Ott
@Alex, you mean espresso-mode. The js2-mode (by Steve Yegge) is _not_ being included into Emacs. They included espresso-mode, and renamed it js-mode.
Ville Laurikari