How to force spaces instead of tabs regardless of major mode?

前端 未结 3 628
挽巷
挽巷 2020-12-31 18:45

I want all tabs to be 4 spaces. I have the following in .emacs

(setq-default indent-tabs-mode nil)
(setq c-basic-indent 4)
(setq tab-width 4)
         


        
3条回答
  •  情深已故
    2020-12-31 19:26

    Declare a default C indentation style, rather than declaring specific style parameters.

    (setq c-default-style "k&r2")  ;; or whatever your preference is
    (set-default 'indent-tabs-mode nil)
    

提交回复
热议问题