feat(core): use general.el for keybind definitions nearly everywhere

Primarily this replaces :bind with :general in all use-package calls.
This commit is contained in:
2022-03-14 20:58:06 +00:00
parent 3fc0d2d77d
commit a8618938bf
91 changed files with 665 additions and 632 deletions

View File

@@ -7,8 +7,8 @@
;;; Code:
(use-package resize-window
:bind
("C-;" . resize-window))
:general
("C-;" 'resize-window))
(provide 'siren-resize-window)
;;; siren-resize-window.el ends here

View File

@@ -11,37 +11,37 @@
(use-package windmove
:straight (:type built-in)
:bind
("M-i" . siren-windmove-up)
("M-k" . siren-windmove-down)
("M-j" . siren-windmove-left)
("M-l" . siren-windmove-right))
:general
("M-i" 'siren-windmove-up)
("M-k" 'siren-windmove-down)
("M-j" 'siren-windmove-left)
("M-l" 'siren-windmove-right))
(use-package buffer-move
:bind
("M-K" . buf-move-down)
("M-I" . buf-move-up)
("M-J" . buf-move-left)
("M-L" . buf-move-right)))
:general
("M-K" 'buf-move-down)
("M-I" 'buf-move-up)
("M-J" 'buf-move-left)
("M-L" 'buf-move-right)))
;; Emacs 27.0 and later
(when (not (version< emacs-version "27.0"))
(use-package windmove
:straight (:type built-in)
:bind
("M-i" . windmove-up)
("M-k" . windmove-down)
("M-j" . windmove-left)
("M-l" . windmove-right)
("M-K" . windmove-swap-states-down)
("M-I" . windmove-swap-states-up)
("M-J" . windmove-swap-states-left)
("M-L" . windmove-swap-states-right)
("C-x M-i" . windmove-delete-up)
("C-x M-k" . windmove-delete-down)
("C-x M-j" . windmove-delete-left)
("C-x M-l" . windmove-delete-right)))
:general
("M-i" 'windmove-up)
("M-k" 'windmove-down)
("M-j" 'windmove-left)
("M-l" 'windmove-right)
("M-K" 'windmove-swap-states-down)
("M-I" 'windmove-swap-states-up)
("M-J" 'windmove-swap-states-left)
("M-L" 'windmove-swap-states-right)
("C-x M-i" 'windmove-delete-up)
("C-x M-k" 'windmove-delete-down)
("C-x M-j" 'windmove-delete-left)
("C-x M-l" 'windmove-delete-right)))
;; Tmux integration with windmove
(when (and (getenv "TMUX")

View File

@@ -9,10 +9,10 @@
(require 'siren-workspace-map)
(use-package zoom-window
:bind
(:map siren-workspace-map
("RET" . zoom-window-zoom)
("C-<return>" . zoom-window-zoom))
:general
(:keymaps 'siren-workspace-map
"RET" 'zoom-window-zoom
"C-<return>" 'zoom-window-zoom)
:config
(with-eval-after-load "persp-mode"