Tutorial :Javascript major mode in Emacs


Which javascript major modes exist in Emacs, and what are their key-features ?


I think what you want is this:


Then again, maybe this what you are looking for?

or this?

People seem to prefer (at least given the highest rated answer):

Updated: http://steve-yegge.blogspot.com/2008/03/js2-mode-new-javascript-mode-for-emacs.html


js2-mode: a new JavaScript mode for Emacs

This is part of a larger project, in progress, to permit writing Emacs extensions in JavaScript instead of Emacs-Lisp.


  • M-x customize
  • Accurate syntax highlighting
  • Indentation
  • Code folding
  • Comment and string filling
  • Syntax errors
  • Strict warnings
  • jsdoc highlighting


With some documentation.


I use Steve Yegge's js2-mode, and like it a lot. It's quite configurable, its indentation ideas match mine, and most impressively it has a full JavaScript parser in it, so it can alert me to syntax errors as I type (indispensable for little things like trailing commas in property lists that bork IE).


Espresso mode is supposed to be quite good as well.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »