This is what javascript-mode
generates with standard tabbing (I never hit the space key when making it). I'd like to have the files contain no tab characters. I can't seem to find any option in the Easy Customization mode.
1 Answer
The buffer-local indent-tabs-mode
variable controls this (in general, for any mode).
Note that javascript-mode
is an alias for js-mode
, so there isn't a javascript-mode-hook
.
(defun my-js-mode-hook ()
"Custom `js-mode' behaviours."
(setq indent-tabs-mode nil))
(add-hook 'js-mode-hook 'my-js-mode-hook)