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 process(o); }
I’d love it enough to buy a 6-pack for the person who made it happen.
April 15th, 2008 at 6:32 pm
Have you tried Steve Yegge’s new JS2 mode (http://code.google.com/p/js2-mode/wiki/InstallationInstructions)?
April 15th, 2008 at 7:01 pm
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.
/mark
April 15th, 2008 at 10:22 pm
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.
April 16th, 2008 at 2:05 am
js2-mode … hmm, I might also be tempted to send a 6-pack in that direction if it works :)