23 lines
793 B
EmacsLisp
23 lines
793 B
EmacsLisp
|
;; Automatically reload files if modified outside of the editor.
|
||
|
(global-auto-revert-mode)
|
||
|
|
||
|
;; Overwrite selected text when typing.
|
||
|
(delete-selection-mode)
|
||
|
|
||
|
;; Display line numbers.
|
||
|
(global-display-line-numbers-mode)
|
||
|
|
||
|
;; Display a ruler in the 80th column.
|
||
|
(setq-default display-fill-column-indicator-column 80)
|
||
|
(add-hook 'prog-mode-hook #'display-fill-column-indicator-mode)
|
||
|
(add-hook 'text-mode-hook #'display-fill-column-indicator-mode)
|
||
|
|
||
|
;; Whitespace settings:
|
||
|
;; - Tabs are 4 space characters (as the gods intended)
|
||
|
;; - Ensure a newline character is present at the end files when saving
|
||
|
;; - Clean up extraneous whitespace when saving
|
||
|
(setq-default indent-tabs-mode nil
|
||
|
tab-width 4)
|
||
|
(setq require-final-newline t)
|
||
|
(add-hook 'before-save-hook 'whitespace-cleanup)
|