News for hackers. Stuff that matters.
Re:Why Emacs is great - SLIME repl for developing in-browser... by sjs on Monday November 29, 2010 @05:02PM (#1951993)
This and js2-mode make Emacs a ridiculously good JS editor.
Re:Why Emacs is great - SLIME repl for developing in-browser... by mccutchen on Monday November 29, 2010 @05:49PM (#1952158)
The last time I tried js2-mode, its indentation rules really drove me crazy. So now I use espresso-mode (which reliably indents the way I expect it to) to write my JS and turn on js2-mode to have it lint my JS.

Do you know if that has changed, or if maybe I'm missing some easy .emacs magic to make it work?

Re:Why Emacs is great - SLIME repl for developing in-browser... by johnbender on Monday November 29, 2010 @06:44PM (#1952346)
https://github.com/mitchellh/dotfiles/blob/master/emacs.d/mo...

You can steal the hooks at the bottom of the file to use the indentation of espresso mode. This was driving me insane too.

Thanks to mitchellh for publishing his dotfile :D

Re:Why Emacs is great - SLIME repl for developing in-browser... by mccutchen on Monday November 29, 2010 @07:04PM (#1952419)
This looks like it's exactly what I was looking for. Many, many thanks to you.
Re:Why Emacs is great - SLIME repl for developing in-browser... by chaitanya on Tuesday November 30, 2010 @03:44AM (#1953559)
Thanks, it was really useful for me too.
Re:Why Emacs is great - SLIME repl for developing in-browser... by mnemonik on Tuesday November 30, 2010 @04:13AM (#1953608)
I also got upset by how whimsical js2-mode can be at times. Espresso-mode (now just js-mode in emacs 23) indents perfectly, and is generally very sane, albeit somewhat boring. I use that as my major mode. However, to get the cool static analysis that I miss from js2-mode, I have flymake set up to us jslint.

http://www.emacswiki.org/emacs/FlymakeJavaScript

The combo of espresso-mode and flymake is like The Good Parts of js2-mode. Now once I add this in to the mix...

Re:Why Emacs is great - SLIME repl for developing in-browser... by jlongster on Monday November 29, 2010 @05:53PM (#1952179)
I had the same problem with js2-mode. For a while I just accepted the indentation rules and it started to make sense, and it also helped that I tweaked the code and settings to fix the real annoyances. I was pretty happy with it but I stopped doing a lot of javascript.

Not sure what the status of js2-mode is right now.

Re:Why Emacs is great - SLIME repl for developing in-browser... by nimms on Monday November 29, 2010 @10:45PM (#1952973)
the main reason I don't use js2-mode is that it breaks mumamo mode which I use in nxhtml. That said, it is a pretty amazing mode. I should look into js2-mode for js files and maybe espresso for nxhtml