33 lines
1.0 KiB
EmacsLisp
33 lines
1.0 KiB
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)
|
|
|
|
;; Make sure that UTF-8 is *ALWAYS* the default encoding.
|
|
(set-charset-priority 'unicode)
|
|
(prefer-coding-system 'utf-8-unix)
|
|
|
|
;; Prettify symbols (eg. lambda -> λ).
|
|
(global-prettify-symbols-mode)
|
|
|
|
;; Enable mouse support.
|
|
(xterm-mouse-mode +1)
|