Tabbing and Emacs

To make tabbing work better in Emacs when other editors are being used as well, i.e. display 4 spaces for a tab character, insert spaces instead of tabs when you hit tab:

;; Turn off tabs
(setq indent-tabs-mode nil)
(setq-default indent-tabs-mode nil)

;; Set the tab width
(setq default-tab-width 4)
(setq tab-width 4)
(setq c-basic-indent 4)

Leave a Reply