I've put together a new emacs mode for js based on js-mode (formerly
espresso) and js2-mode, the main purpose of which was to support
comma-first style. Check it out at https://github.com/thomblake/js-mode
Mostly indents the way espresso does, except:
* supports comma-first style (or comma-last style)
* supports operator-first style (or operator-last style)
* properly indents comma-last continued var statements
* has all the syntax highlighting, error detection, etc of js2-mode
I know it is compatible with emacs 23.2, but welcome feedback on
compatibility/incompatibility with your version of emacs.
Feel free to file issue reports on github for things like "it indented
like [code block] but I want it to be [code block]".
-Thom Blake
> Following code as stand alone is not right JavaScript code, while it's
> proper JSON code:
>
> { "foo": "bar" }
>
> js2-mode will mark it red as it won't work as JavaScript,
Huh ?
--
Jorge.