diff --git a/init.el b/init.el index 422ab93..a74d839 100644 --- a/init.el +++ b/init.el @@ -58,6 +58,22 @@ '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) + ;; -------------------------------------------------------------------------- + ;; Formatting + ;; -------------------------------------------------------------------------- + + (setq-default tab-width 8) ;; Tab width + (setq-default indent-tabs-mode nil) ;; No tabs + (setq-default fill-column 79) ;; Line width + (setq-default whitespace-line-column fill-column) ;; For whitespace mode + (setq-default c-default-style "linux") ;; Default C style + + (defun toggle-indent-tabs-mode () + "Toggle a indent-tabs-mode between a defined and undefined state." + (interactive) + (setq indent-tabs-mode (not indent-tabs-mode)) + (setq-default indent-tabs-mode indent-tabs-mode)) + ;; -------------------------------------------------------------------------- ;; Configure garbage collection. ;;