Can't change Emacs's default indentation between HTML tags

Posted by janoChen on Stack Overflow See other posts from Stack Overflow or by janoChen
Published on 2010-01-16T08:59:53Z Indexed on 2010/04/26 14:03 UTC
Read the original article Hit count: 240

Filed under:
|

I'm confused about the Emacs indentation paradigm.

I have this in my .emacs file:

(setq-default tab-width 4)

If I press TAB in the following situation

                    <ul>
(caret)
                    </ul>

it end up like this

                   <ul>
                     (caret)
                   </ul>

(with 2 spaces indentation between the HTML tags.)

It should end up like this:

                   <ul>
                       (caret)
                   </ul>

I tried everything:

(setq-default tab-width 4)
(setq-default indent-tabs-mode t)
(setq tab-stop-list '(4 8 12 16))

I've set every possible Emacs setting about indentation to 4 but that 2 space indentation is still there.

Any suggestions?

© Stack Overflow or respective owner

Related posts about emacs

Related posts about indentation