Emacs js2-mode FTW!

April 9th, 2008

Steve Yegge recently released a javascript mode for emacs. After giving it a try I can say that it's very nice! Stop on over to http://code.google.com/p/js2-mode/ and get yourself a copy. To make your life easier here's how you install it.
  1. Download a copy and save it somewhere in your emacs load directory as js2.el.
  2. Fire up emacs and run M-x byte-compile-file RE js2.e
  3. Add the following to your .emacs file
1
2
3

(autoload 'js2-mode "js2" nil t)                                                
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) 
Thanks Steve!!!

1 Response Follows

  1. Brian Adkins says
    Great tip - I'm always on the lookout for emacs goodies :)

Sorry, comments are closed for this article.