;; -*- lexical-binding: t; -*- ;;;; standard bindings ;; both of these are bad--especially in exwm (global-unset-key (kbd "C-z")) (global-unset-key (kbd "C-x C-z")) (global-set-key (kbd "C-z =") 'text-scale-increase) (global-set-key (kbd "C-z -") 'text-scale-decrease) ;;;; UI (setopt inhibit-startup-message t) ;;;; defaults ;; basic editing (setopt kill-whole-line t) (global-hl-line-mode 1) (global-visual-line-mode t) (defun bd/cleanup-buffer () (interactive) (delete-trailing-whitespace) (untabify (point-min) (point-max)) (indent-region (point-min) (point-max))) (setopt next-line-add-newlines t) (add-hook 'before-save-hook 'bd/cleanup-buffer) ;;;; buffers (global-auto-revert-mode 1) (winner-mode 1) ;; do not show async command buffers by default (add-to-list 'display-buffer-alist (cons "\\*Async Shell Command\\*.*" (cons #'display-buffer-no-window nil))) (setopt scroll-up-aggressively '0.65 scroll-down-aggressively '0.65) (provide 'bd--essentials)