I always want the tab width to be 4 spaces, no matter what. How do I do it?
Asked
Active
Viewed 248 times
3
-
3Welcome to the world of Emacs. What is you seek is *not* possible -- it is buffer-local, so you'll need to reset it for each major mode that sets it to something you don't like. Use a major-mode hook to reset it. The best you can do is set a default -- e.g., `(setq-default tab-width 4)` -- but a major-mode can still change it and you'll need to change it back with a major-mode hook. Or, do like me, customize the source code of all major-modes you use on a daily basis and take complete control. – lawlist Feb 25 '16 at 18:52
-
3Related: [Trouble adjusting tab-width](http://emacs.stackexchange.com/questions/17563/trouble-adjusting-tab-width). – Dan Feb 25 '16 at 21:10