3 ms·
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 writ
by mccutchen 16y ago
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?
- jlongster 16y agoI 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.
- johnbender 16y agohttps://github.com/mitchellh/dotfiles/blob/master/emacs.d/modes.el 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
- mnemonik 16y agoI 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 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...