Emacs: Makefile tab size
How t开发者_高级运维o make tab to indent by 4 spaces (be it spaces or true tabs like in makefiles). By default my emacs inserts 2 spaces in C files and tabs indent by 8 in makefiles.
Thanks.
I have this in my emacs config file to set tab width to 4 globally:
; Turn on tabs
(setq indent-tabs-mode t)
(setq-default indent-tabs-mode t)
;; Bind the TAB key
(global-set-key (kbd "TAB") 'self-insert-command)
;; Set the tab width
(setq default-tab-width 4)
(setq tab-width 4)
(setq c-basic-indent 4)
精彩评论