diff options
author | William Carroll <wpcarro@gmail.com> | 2020-01-20T12·11+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-01-22T21·13+0000 |
commit | b4a6551dd5817059b2fff7ca59ce5956f045027d (patch) | |
tree | ee83d786cc7656054f46530995de3ffe8faca2c4 /configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el | |
parent | 40742c612a59dfad6f6ab21797e2a279be1f1a78 (diff) |
Drop support for evil-leader
Preferring to use the `general` package for defining leader-prefixed keybindings than `evil-leader`. This TODO has existed for quite awhile, so I'm pleased to finish it! During the cleanup, I deleted some keybindings that I no longer used.
Diffstat (limited to 'configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el')
-rw-r--r-- | configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el b/configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el index 2cae7d3f7092..2ff4fe375829 100644 --- a/configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el +++ b/configs/shared/.emacs.d/wpc/packages/wpc-keybindings.el @@ -5,13 +5,18 @@ ;; This module hosts my Evil preferences ;; ;; Wish List: -;; - drop support for `evil-leader' library in favor of `general.el' ;; - restore support for concise (n <kbd> <function>) instead of `general-mmap' ;; - restore support for `general-unbind' ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Dependencies +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(require 'general) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -86,51 +91,46 @@ ;; kbds for magit is with `evil-magit'. (use-package evil-magit) -;; expose a leader key -(use-package evil-leader - :after (evil) - :config - (global-evil-leader-mode 1) - (evil-leader/set-leader "<SPC>") - (evil-leader/set-key - "i" #'counsel-semantic-or-imenu - "I" #'ibuffer - "hk" #'helpful-callable - "hf" #'helpful-function - "hm" #'helpful-macro - "hc" #'helpful-command - "hk" #'helpful-key - "hv" #'helpful-variable - "hp" #'helpful-at-point - "s" #'flyspell-mode - "S" #'sort-lines - "a" #'wpc-terminal/toggle - "=" #'align - "p" #'flycheck-previous-error - "f" #'wpc/find-file - "n" #'flycheck-next-error - "N" #'smerge-next - "W" #'balance-windows - "gs" #'magit-status - "E" #'refine - - "es" #'wpc/create-snippet - ;; TODO: Replace with `macros/ilambda' when that is working again. - "ev" (lambda () (interactive) (wpc/find-file-split "~/.config/nvim/init.vim")) - "ee" (lambda () (interactive) (wpc/find-file-split "~/.emacs.d/init.el")) - "ez" (lambda () (interactive) (wpc/find-file-split "~/.zshrc")) - "ea" (lambda () (interactive) (wpc/find-file-split "~/aliases.zsh")) - "ef" (lambda () (interactive) (wpc/find-file-split "~/functions.zsh")) - "el" (lambda () (interactive) (wpc/find-file-split "~/variables.zsh")) - "ex" (lambda () (interactive) (wpc/find-file-split "~/.Xresources")) - "em" (lambda () (interactive) (wpc/find-file-split "~/.tmux.conf")) - - "l" #'locate - "L" #'list-packages - "B" #'magit-blame - "w" #'save-buffer - "r" #'wpc/evil-replace-under-point - "R" #'deadgrep)) +;; TODO: Consider moving this to another module. +(general-define-key + :prefix "<SPC>" + :states '(normal) + "i" #'counsel-semantic-or-imenu + "I" #'ibuffer + "hk" #'helpful-callable + "hf" #'helpful-function + "hm" #'helpful-macro + "hc" #'helpful-command + "hk" #'helpful-key + "hv" #'helpful-variable + "hp" #'helpful-at-point + "s" #'flyspell-mode + "S" #'sort-lines + "a" #'wpc-terminal/toggle + "=" #'align + "p" #'flycheck-previous-error + "f" #'wpc/find-file + "n" #'flycheck-next-error + "N" #'smerge-next + "W" #'balance-windows + "gs" #'magit-status + "E" #'refine + "es" #'wpc/create-snippet + ;; TODO: Replace with `macros/ilambda' when that is working again. + "ev" (lambda () (interactive) (wpc/find-file-split "~/.config/nvim/init.vim")) + "ee" (lambda () (interactive) (wpc/find-file-split "~/.emacs.d/init.el")) + "ez" (lambda () (interactive) (wpc/find-file-split "~/.zshrc")) + "ea" (lambda () (interactive) (wpc/find-file-split "~/aliases.zsh")) + "ef" (lambda () (interactive) (wpc/find-file-split "~/functions.zsh")) + "el" (lambda () (interactive) (wpc/find-file-split "~/variables.zsh")) + "ex" (lambda () (interactive) (wpc/find-file-split "~/.Xresources")) + "em" (lambda () (interactive) (wpc/find-file-split "~/.tmux.conf")) + "l" #'locate + "L" #'list-packages + "B" #'magit-blame + "w" #'save-buffer + "r" #'wpc/evil-replace-under-point + "R" #'deadgrep) ;; create comments easily (use-package evil-commentary |