diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-12-01 11:08:41 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-12-01 11:08:41 +0100 |
commit | 8a7ebce5c536141264511a6bcb4692383c18ab14 (patch) | |
tree | 0c6d62626b4e0cfda69d7039d9019dba32d4f3b9 /.config/emacs/modules | |
parent | b9cd9fa20a1c3c83452b8e77afb676b72bc28317 (diff) |
emacs: Add a windowing module
Diffstat (limited to '.config/emacs/modules')
-rw-r--r-- | .config/emacs/modules/mm-window.el | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/.config/emacs/modules/mm-window.el b/.config/emacs/modules/mm-window.el new file mode 100644 index 0000000..0ce77c7 --- /dev/null +++ b/.config/emacs/modules/mm-window.el @@ -0,0 +1,72 @@ +;;; mm-window.el --- Window configurations -*- lexical-binding: t; -*- + + +;;; Unique Buffer Names + +(use-package uniquify + :custom + (uniquify-buffer-name-style 'forward)) + + +;;; Highlight Whitespace + +(use-package whitespace + :bind (("<f1>" . whitespace-mode) + ("C-c z" . delete-trailing-whitespace)) + :custom + (whitespace-style + '( face trailing spaces tabs space-mark tab-mark empty indentation + space-after-tab space-before-tab)) + (whitespace-display-mappings + '((space-mark 32 [?·] [?.]) ; Space + (space-mark 160 [?␣] [?_]) ; Non-Breaking Space + (tab-mark 9 [?» ?\t] [?> ?\t])))) + + +;;; Line Numbers + +(use-package display-line-numbers + :bind ("<f2>" . display-line-numbers-mode) + :custom + (display-line-numbers-grow-only t) + (display-line-numbers-type 'relative) + (display-line-numbers-width-start 99)) + + +;;; Select Help Windows + +(use-package help + :custom + (help-window-select t)) + + +;;; Window Scrolling + +(use-package window + :custom + (scroll-conservatively 101) ; (info "(Emacs)Auto Scrolling") + (scroll-error-top-bottom t) + (scroll-margin 10) + :config + (setq-default truncate-partial-width-windows nil)) + + +;;; Smoother Scrolling + +(mm-comment + (use-package pixel-scroll + :init + (pixel-scroll-precision-mode) + :config + ;; Make it easier to use custom scroll functions + (dolist (binding '("<next>" "<prior>")) + (keymap-unset pixel-scroll-precision-mode-map binding :remove)))) + + +;;; Ace Window + +(use-package ace-window + :ensure t + :bind ("M-o" . ace-window)) + +(provide 'mm-window)
\ No newline at end of file |