Basic formatting settings

This commit is contained in:
Wojciech Kozlowski 2017-08-18 22:30:43 +01:00
parent 7e1b13ffb0
commit 4dcf901a1b

16
init.el
View File

@ -58,6 +58,22 @@
'("melpa" . "http://melpa.milkbox.net/packages/") t) '("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize) (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. ;; Configure garbage collection.
;; ;;