config

Personal configuration.
git clone git://code.dwrz.net/config
Log | Files | Refs

commit 16583ac714f43067997007f449fed619c4278af7
parent a3c581f0523acb6ab96d7ce58487e1b13c557e8a
Author: dwrz <dwrz@dwrz.net>
Date:   Sun,  4 Feb 2024 12:43:08 +0000

Update Emacs init

Diffstat:
Memacs/init.el | 81+++++++++++++++++++++++++++++++++++++++++++------------------------------------
1 file changed, 44 insertions(+), 37 deletions(-)

diff --git a/emacs/init.el b/emacs/init.el @@ -314,6 +314,10 @@ (use-package flycheck :defer t :ensure t) +(use-package flyspell + :bind (:map flyspell-mode-map ("C-;" . nil)) + :ensure nil) + (use-package frame :config (window-divider-mode -1) :ensure nil) (use-package git-commit @@ -781,6 +785,10 @@ :ensure t :hook (visual-line-mode . visual-fill-column-mode)) +(use-package vterm + :config (setq vterm-max-scrollback 32767) + :ensure t) + (use-package web-mode :config (setq web-mode-code-indent-offset 2 web-mode-css-indent-offset 2 @@ -831,35 +839,6 @@ "s" #'cape-elisp-symbol "w" #'cape-dict) -(defvar-keymap dwrz-exec-map - "s" #'dwrz-shell-in-current-directory) - -(defvar-keymap dwrz-org-map - "a" #'(lambda () (interactive) (dwrz-switch-org-ctx "all")) - "c" #'(lambda () (interactive) (dwrz-switch-org-ctx "chimerical")) - "d" #'(lambda () (interactive) (dwrz-switch-org-ctx "dwrz")) - "e" #'(lambda () (interactive) (dwrz-switch-org-ctx "eti"))) - -(defvar-keymap dwrz-region-map - "U" #'prot-simple-unfill-region-or-paragraph - "c" #'rot13-region - "d" #'downcase-region - "f" #'fill-region - "o" #'comment-or-uncomment-region - "r" #'reverse-region - "s" #'sort-lines - "u" #'upcase-region) - -(defvar-keymap dwrz-windows-map - "+" #'text-scale-increase - "-" #'text-scale-decrease - "=" (cons "reset" #'(lambda () (interactive) (text-scale-increase 0))) - "b" #'balance-windows - "l" #'shrink-window - "n" #'shrink-window-horizontally - "t" #'enlarge-window - "w" #'enlarge-window-horizontally) - (defvar-keymap dwrz-highlight-map :doc "Prefix keymap for highlight." :name "Highlight" @@ -869,6 +848,12 @@ "s" #'highlight-symbol-at-point "u" #'unhighlight-regexp) +(defvar-keymap dwrz-org-map + "a" #'(lambda () (interactive) (dwrz-switch-org-ctx "all")) + "c" #'(lambda () (interactive) (dwrz-switch-org-ctx "chimerical")) + "d" #'(lambda () (interactive) (dwrz-switch-org-ctx "dwrz")) + "e" #'(lambda () (interactive) (dwrz-switch-org-ctx "eti"))) + (defvar-keymap dwrz-point-map :doc "Prefix keymap for point." :name "Point" @@ -878,6 +863,16 @@ "s" #'ispell-word "t" (cons "timestamp" #'dwrz-insert-timestamp)) +(defvar-keymap dwrz-region-map + "U" #'prot-simple-unfill-region-or-paragraph + "c" #'rot13-region + "d" #'downcase-region + "f" #'fill-region + "o" #'comment-or-uncomment-region + "r" #'reverse-region + "s" #'sort-lines + "u" #'upcase-region) + (defvar-keymap dwrz-search-map "a" #'(lambda () (interactive) (consult-notmuch-address t nil)) "c" #'consult-mark @@ -892,27 +887,39 @@ "t" #'consult-outline "v" #'consult-git-grep) +(defvar-keymap dwrz-terminal-map + "s" #'dwrz-shell-in-current-directory) + +(defvar-keymap dwrz-windows-map + "+" #'text-scale-increase + "-" #'text-scale-decrease + "9" #'dwrz-split-window-two-thirds + "=" (cons "reset" #'(lambda () (interactive) (text-scale-increase 0))) + "b" #'balance-windows + "l" #'shrink-window + "n" #'shrink-window-horizontally + "t" #'enlarge-window + "w" #'enlarge-window-horizontally) + (defvar-keymap dwrz-prefix-map :doc "Prefix keymap with multiple subkeymaps." :name "dwrz prefix" + "#" #'display-line-numbers-mode + "H" #'hippie-expand "c" (cons "cape" dwrz-cape-map) - "e" (cons "exec" dwrz-exec-map) + "e" (cons "exec" #'execute-extended-command) "h" (cons "highlight" dwrz-highlight-map) + "j" (cons "jump" #'jump-to-register) "o" (cons "org" dwrz-org-map) "p" (cons "point" dwrz-point-map) "r" (cons "region" dwrz-region-map) "s" (cons "search" dwrz-search-map) + "t" (cons "exec" dwrz-terminal-map) "w" (cons "window" dwrz-windows-map)) ;; KEYBINDINGS -(global-set-key (kbd "C-:") dwrz-prefix-map) -(global-set-key (kbd "C-c #") 'display-line-numbers-mode) +(global-set-key (kbd "C-;") dwrz-prefix-map) (global-set-key (kbd "C-c b") 'ibuffer) (global-set-key (kbd "C-c c") 'dwrz-org-capture-at-point) -(global-set-key (kbd "C-c e") 'execute-extended-command) -(global-set-key (kbd "C-c h") 'hippie-expand) -(global-set-key (kbd "C-c j") 'jump-to-register) (global-set-key (kbd "C-c l") 'org-store-link) -(global-set-key (kbd "C-x 9") 'dwrz-split-window-two-thirds) (global-set-key (kbd "C-x C-b") 'ibuffer) -(keymap-set global-map "C-;" dwrz-prefix-map)