I'm looking for a way to turn off automatic indentation in emacs. I don't want emacs to automatically indent code when I enter special characters like ; or /*
Thanks for any help.
I'm looking for a way to turn off automatic indentation in emacs. I don't want emacs to automatically indent code when I enter special characters like ; or /*
Thanks for any help.
If you're using a mode based on CC-mode, C-c C-l
will toggle electricity.
Steve Yegge's js2-mode is great.
From http://code.google.com/p/js2-mode/
An improved JavaScript mode for GNU Emacs.
Features:
Eventually aims to be competitive with IntelliJ and other best-of-class JavaScript editors.
Note - this mode is for GNU Emacs, version 21 and higher. It does not support XEmacs.
Set javascript-auto-indent-flag
to nil
before loading javascript-mode. You can either add a line to your .emacs
file or type
M-x customize-group RET javascript RET
and edit the value there and save. You may need to restart Emacs for this to take effect; at least in the version of javascript.el
that I have, the flag is only consulted when setting up the keymap.