I've been unsuccessful in getting Emacs to switch from 8 space tabs to 4 space tabs when pressing the TAB in buffers with the major mode text-mode. I've added the following to my .emacs:
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
;;; And I have …
I'd like to use 2 spaces for my indents instead of 4. I can change the default behavior of C mode using:
(setq c-basic-offset 2)
How do I change this in javascript mode?
I'm running emacs 23 with c++-mode and having some indentation problems.
Suppose I have this code:
void foo()
{
if (cond)
{ <---
int i;
...
} <---
}
This seems to be the default behavior of the automatic indentation.
However I'd like …