Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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