3

I always want the tab width to be 4 spaces, no matter what. How do I do it?

  • 3
    Welcome 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
  • 3
    Related: Trouble adjusting tab-width. – Dan Feb 25 '16 at 21:10

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.