emacs javascript mode

Dear lazyweb,

I would really really love a JavaScript mode for emacs which indented “for each” correctly:

for each(let o in a) {
  // single indent

I’d love it enough to buy a 6-pack for the person who made it happen.

Atom Feed for Comments 4 Responses to “emacs javascript mode”

  1. metapundit Says:

    Have you tried Steve Yegge’s new JS2 mode (http://code.google.com/p/js2-mode/wiki/InstallationInstructions)?

  2. Mark Kennedy Says:

    check out http://code.google.com/p/js2-mode/. it’s still under development but
    others have said it is quite usable. i don’t know if it will work the way you
    want but it seemed to format your example as you wanted it when i tested it.
    the emacs development team is leaning towards including it as part of emacs
    as soon as the author says it is ready.


  3. Asrail Says:

    Steve claims that js2-mode works for Javascript 1.7 and he pretends to make it work on JS2, hence the name.

    I dislike some of its defaults preferences, because they’re more likely intellij IDEA and Eclipse, but there are configurations to make it work fine.

  4. beaufour Says:

    js2-mode … hmm, I might also be tempted to send a 6-pack in that direction if it works :)

Leave a Reply