I want the tab key to insert four spaces. No matter what I do, it inserts 2 spaces. Here's the code I thought would work:

(setq tab-width 4)
(setq indent-tabs-mode nil)

I also have this set for a single mode:

(setq c-mode-hook
    (function (lambda ()
                (setq indent-tabs-mode nil)
                (setq c-indent-level 4))))

What am I doing wrong?

link|improve this question
feedback

1 Answer

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.