Remove package arg from evil-collection-define-key

Implement version of evil-define-key instead. The bindings are made immediately
if the map is available. Otherwise, there are lazily made in the same way that
evil-define-key makes them.
This commit is contained in:
Justin Burkett 2018-06-06 07:32:19 -04:00 committed by James N
parent 317e115a95
commit 29759c9419
84 changed files with 258 additions and 245 deletions

View File

@ -35,7 +35,7 @@
(defun evil-collection-ag-setup () (defun evil-collection-ag-setup ()
"Set up `evil' bindings for `ag'." "Set up `evil' bindings for `ag'."
(evil-collection-define-key '(normal visual) 'ag 'ag-mode-map (evil-collection-define-key '(normal visual) 'ag-mode-map
"k" 'evil-previous-line "k" 'evil-previous-line
"h" 'evil-backward-char "h" 'evil-backward-char

View File

@ -54,19 +54,19 @@
(evil-set-initial-state 'alchemist-test-mode 'normal) (evil-set-initial-state 'alchemist-test-mode 'normal)
(evil-set-initial-state 'alchemist-test-report-mode 'normal) (evil-set-initial-state 'alchemist-test-report-mode 'normal)
(evil-collection-define-key 'normal 'alchemist 'alchemist-compile-mode-map (evil-collection-define-key 'normal 'alchemist-compile-mode-map
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'alchemist 'alchemist-eval-mode-map (evil-collection-define-key 'normal 'alchemist-eval-mode-map
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'alchemist 'alchemist-execute-mode-map (evil-collection-define-key 'normal 'alchemist-execute-mode-map
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'alchemist 'alchemist-message-mode-map (evil-collection-define-key 'normal 'alchemist-message-mode-map
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'alchemist 'alchemist-help-minor-mode-map (evil-collection-define-key 'normal 'alchemist-help-minor-mode-map
"q" 'quit-window "q" 'quit-window
"K" 'alchemist-help-search-at-point "K" 'alchemist-help-search-at-point
"m" 'alchemist-help-module "m" 'alchemist-help-module
@ -75,20 +75,20 @@
"gd" 'alchemist-goto-definition-at-point "gd" 'alchemist-goto-definition-at-point
"g?" 'alchemist-help-minor-mode-key-binding-summary) "g?" 'alchemist-help-minor-mode-key-binding-summary)
(evil-collection-define-key 'normal 'alchemist 'alchemist-macroexpand-mode-map (evil-collection-define-key 'normal 'alchemist-macroexpand-mode-map
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'alchemist 'alchemist-refcard-mode-map (evil-collection-define-key 'normal 'alchemist-refcard-mode-map
"gd" 'alchemist-refcard--describe-funtion-at-point "gd" 'alchemist-refcard--describe-funtion-at-point
"g?" 'alchemist-refcard--describe-funtion-at-point "g?" 'alchemist-refcard--describe-funtion-at-point
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'alchemist 'alchemist-mix-mode-map (evil-collection-define-key 'normal 'alchemist-mix-mode-map
"q" 'quit-window "q" 'quit-window
"i" 'alchemist-mix-send-input-to-mix-process "i" 'alchemist-mix-send-input-to-mix-process
"gr" 'alchemist-mix-rerun-last-task) "gr" 'alchemist-mix-rerun-last-task)
(evil-collection-define-key 'normal 'alchemist 'alchemist-test-report-mode-map (evil-collection-define-key 'normal 'alchemist-test-report-mode-map
"q" 'quit-window "q" 'quit-window
"t" 'toggle-truncate-lines "t" 'toggle-truncate-lines
"gr" 'alchemist-mix-rerun-last-test "gr" 'alchemist-mix-rerun-last-test
@ -100,7 +100,7 @@
"[" 'alchemist-test-previous-stacktrace-file "[" 'alchemist-test-previous-stacktrace-file
(kbd "C-c C-k") 'alchemist-report-interrupt-current-process) (kbd "C-c C-k") 'alchemist-report-interrupt-current-process)
(evil-collection-define-key 'normal 'alchemist 'alchemist-mode-map (evil-collection-define-key 'normal 'alchemist-mode-map
"gz" 'alchemist-iex-run "gz" 'alchemist-iex-run
"K" 'alchemist-help-search-at-point "K" 'alchemist-help-search-at-point
"gd" 'alchemist-goto-definition-at-point "gd" 'alchemist-goto-definition-at-point

View File

@ -39,7 +39,7 @@
;; latest anaconda uses `anaconda-view-mode-map'; anaconda stable ;; latest anaconda uses `anaconda-view-mode-map'; anaconda stable
;; uses `anaconda-mode-view-mode-map' ;; uses `anaconda-mode-view-mode-map'
(evil-collection-define-key 'normal 'anaconda-mode (if (boundp 'anaconda-mode-view-mode-map) (evil-collection-define-key 'normal (if (boundp 'anaconda-mode-view-mode-map)
'anaconda-mode-view-mode-map 'anaconda-mode-view-mode-map
'anaconda-view-mode-map) 'anaconda-view-mode-map)
"gj" 'next-error-no-select "gj" 'next-error-no-select
@ -50,7 +50,7 @@
"[" 'previous-error-no-select "[" 'previous-error-no-select
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'anaconda-mode 'anaconda-mode-map (evil-collection-define-key 'normal 'anaconda-mode-map
;; Would be nice to support these too. ;; Would be nice to support these too.
;; 'anaconda-mode-find-assignments ;; 'anaconda-mode-find-assignments
;; 'anaconda-mode-find-references ;; 'anaconda-mode-find-references

View File

@ -36,7 +36,7 @@
"Set up `evil' bindings for `arc-mode'." "Set up `evil' bindings for `arc-mode'."
(evil-set-initial-state 'arc-mode 'normal) (evil-set-initial-state 'arc-mode 'normal)
(evil-set-initial-state 'archive-mode 'normal) (evil-set-initial-state 'archive-mode 'normal)
(evil-collection-define-key 'normal 'arc-mode 'archive-mode-map (evil-collection-define-key 'normal 'archive-mode-map
"j" 'archive-next-line "j" 'archive-next-line
"k" 'archive-previous-line "k" 'archive-previous-line
(kbd "C-j") 'archive-next-line (kbd "C-j") 'archive-next-line

View File

@ -35,7 +35,7 @@
"Set up `evil' bindings for `bookmark'." "Set up `evil' bindings for `bookmark'."
(evil-set-initial-state 'bookmark-bmenu-mode 'normal) (evil-set-initial-state 'bookmark-bmenu-mode 'normal)
(evil-collection-define-key 'normal 'bookmark 'bookmark-bmenu-mode-map (evil-collection-define-key 'normal 'bookmark-bmenu-mode-map
"q" 'quit-window "q" 'quit-window
"gr" 'revert-buffer "gr" 'revert-buffer
"g?" 'describe-mode "g?" 'describe-mode

View File

@ -73,7 +73,7 @@ When called interactively prompt for MARK; RET remove all marks."
(evil-set-initial-state 'Buffer-menu-mode 'normal) (evil-set-initial-state 'Buffer-menu-mode 'normal)
(evil-add-hjkl-bindings Buffer-menu-mode-map 'normal) (evil-add-hjkl-bindings Buffer-menu-mode-map 'normal)
(evil-collection-define-key 'normal 'buf-menu 'Buffer-menu-mode-map (evil-collection-define-key 'normal 'Buffer-menu-mode-map
"ZQ" 'evil-quit "ZQ" 'evil-quit
"ZZ" 'quit-window "ZZ" 'quit-window
"gr" 'revert-buffer "gr" 'revert-buffer

View File

@ -33,7 +33,7 @@
(defun evil-collection-calc-setup () (defun evil-collection-calc-setup ()
"Set up `evil' bindings for `calc'." "Set up `evil' bindings for `calc'."
(evil-collection-util-inhibit-insert-state calc calc-mode-map) (evil-collection-util-inhibit-insert-state calc-mode-map)
(evil-set-initial-state 'calc-mode 'normal) (evil-set-initial-state 'calc-mode 'normal)
;; Calc sets up its bindings just-in-time for its "extensions". I don't think ;; Calc sets up its bindings just-in-time for its "extensions". I don't think
@ -41,7 +41,7 @@
;; while making the bindings much harder to maintain. ;; while making the bindings much harder to maintain.
(require 'calc-ext) (require 'calc-ext)
(evil-collection-define-key 'normal 'calc 'calc-mode-map (evil-collection-define-key 'normal 'calc-mode-map
"0" 'calcDigit-start "0" 'calcDigit-start
"1" 'calcDigit-start "1" 'calcDigit-start
"2" 'calcDigit-start "2" 'calcDigit-start
@ -166,7 +166,7 @@
;; "ZZ" 'quit-window ; TODO: Rebind "Z"? ;; "ZZ" 'quit-window ; TODO: Rebind "Z"?
"q" 'calc-quit) "q" 'calc-quit)
(evil-collection-define-key 'visual 'calc 'calc-mode-map (evil-collection-define-key 'visual 'calc-mode-map
"d" 'calc-kill-region)) "d" 'calc-kill-region))
(provide 'evil-collection-calc) (provide 'evil-collection-calc)

View File

@ -35,7 +35,7 @@
(defun evil-collection-calendar-setup () (defun evil-collection-calendar-setup ()
"Set up `evil' bindings for `calendar'." "Set up `evil' bindings for `calendar'."
(evil-set-initial-state 'calendar-mode 'normal) (evil-set-initial-state 'calendar-mode 'normal)
(evil-collection-define-key 'normal 'calendar 'calendar-mode-map (evil-collection-define-key 'normal 'calendar-mode-map
;; motion ;; motion
"h" 'calendar-backward-day "h" 'calendar-backward-day
"j" 'calendar-forward-week "j" 'calendar-forward-week

View File

@ -91,11 +91,11 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
(when evil-collection-settings-setup-debugger-keys (when evil-collection-settings-setup-debugger-keys
(add-hook 'cider-mode-hook #'evil-normalize-keymaps) (add-hook 'cider-mode-hook #'evil-normalize-keymaps)
(add-hook 'cider--debug-mode-hook #'evil-normalize-keymaps) (add-hook 'cider--debug-mode-hook #'evil-normalize-keymaps)
(evil-collection-define-key 'normal 'cider 'cider-mode-map (evil-collection-define-key 'normal 'cider-mode-map
[f6] 'cider-browse-instrumented-defs [f6] 'cider-browse-instrumented-defs
[f9] 'cider-debug-defun-at-point) [f9] 'cider-debug-defun-at-point)
(evil-collection-define-key 'normal 'cider 'cider--debug-mode-map (evil-collection-define-key 'normal 'cider--debug-mode-map
"b" 'cider-debug-defun-at-point "b" 'cider-debug-defun-at-point
"n" 'evil-collection-cider-debug-next "n" 'evil-collection-cider-debug-next
"c" 'evil-collection-cider-debug-continue "c" 'evil-collection-cider-debug-continue
@ -107,14 +107,14 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
"L" 'evil-collection-cider-debug-locals "L" 'evil-collection-cider-debug-locals
"H" 'cider-debug-move-here)) "H" 'cider-debug-move-here))
(evil-collection-define-key '(normal visual) 'cider 'cider-mode-map (evil-collection-define-key '(normal visual) 'cider-mode-map
"gd" 'cider-find-var "gd" 'cider-find-var
(kbd "C-t") 'cider-pop-back (kbd "C-t") 'cider-pop-back
"gz" 'cider-switch-to-repl-buffer "gz" 'cider-switch-to-repl-buffer
"gf" 'cider-find-resource "gf" 'cider-find-resource
"K" 'cider-doc) "K" 'cider-doc)
(evil-collection-define-key '(normal visual) 'cider 'cider-repl-mode-map (evil-collection-define-key '(normal visual) 'cider-repl-mode-map
;; FIXME: This seems to get overwritten by `cider-switch-to-repl-buffer'. ;; FIXME: This seems to get overwritten by `cider-switch-to-repl-buffer'.
"gz" 'cider-switch-to-last-clojure-buffer "gz" 'cider-switch-to-last-clojure-buffer
@ -124,7 +124,7 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
"gf" 'cider-find-resource "gf" 'cider-find-resource
"K" 'cider-doc) "K" 'cider-doc)
(evil-collection-define-key 'normal 'cider 'cider-test-report-mode-map (evil-collection-define-key 'normal 'cider-test-report-mode-map
(kbd "C-c ,") 'cider-test-commands-map (kbd "C-c ,") 'cider-test-commands-map
(kbd "C-c C-t") 'cider-test-commands-map (kbd "C-c C-t") 'cider-test-commands-map
(kbd "M-p") 'cider-test-previous-result (kbd "M-p") 'cider-test-previous-result
@ -146,7 +146,7 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
"gr" 'cider-test-run-test "gr" 'cider-test-run-test
"q" 'cider-popup-buffer-quit-function) "q" 'cider-popup-buffer-quit-function)
(evil-collection-define-key 'normal 'cider 'cider-macroexpansion-mode-map (evil-collection-define-key 'normal 'cider-macroexpansion-mode-map
;; quit ;; quit
"q" 'cider-popup-buffer-quit-function "q" 'cider-popup-buffer-quit-function
@ -159,7 +159,7 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
"u" 'cider-macroexpand-undo "u" 'cider-macroexpand-undo
[remap undo] 'cider-macroexpand-undo) [remap undo] 'cider-macroexpand-undo)
(evil-collection-define-key 'normal 'cider 'cider-connections-buffer-mode-map (evil-collection-define-key 'normal 'cider-connections-buffer-mode-map
"d" 'cider-connections-make-default "d" 'cider-connections-make-default
"c" 'cider-connection-browser "c" 'cider-connection-browser
"x" 'cider-connections-close-connection "x" 'cider-connections-close-connection
@ -167,7 +167,7 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
"g?" 'describe-mode) "g?" 'describe-mode)
(evil-set-initial-state 'cider-stacktrace-mode 'normal) (evil-set-initial-state 'cider-stacktrace-mode 'normal)
(evil-collection-define-key 'normal 'cider 'cider-stacktrace-mode-map (evil-collection-define-key 'normal 'cider-stacktrace-mode-map
(kbd "C-k") 'cider-stacktrace-previous-cause (kbd "C-k") 'cider-stacktrace-previous-cause
(kbd "C-j") 'cider-stacktrace-next-cause (kbd "C-j") 'cider-stacktrace-next-cause
(kbd "gk") 'cider-stacktrace-previous-cause (kbd "gk") 'cider-stacktrace-previous-cause
@ -193,7 +193,7 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
[backtab] 'cider-stacktrace-cycle-all-causes) [backtab] 'cider-stacktrace-cycle-all-causes)
(add-hook 'cider-inspector-mode-hook #'evil-normalize-keymaps) (add-hook 'cider-inspector-mode-hook #'evil-normalize-keymaps)
(evil-collection-define-key 'normal 'cider 'cider-inspector-mode-map (evil-collection-define-key 'normal 'cider-inspector-mode-map
"q" 'quit-window "q" 'quit-window
(kbd "RET") 'cider-inspector-operate-on-point (kbd "RET") 'cider-inspector-operate-on-point
[mouse-1] 'cider-inspector-operate-on-click [mouse-1] 'cider-inspector-operate-on-click

View File

@ -35,10 +35,10 @@
(defun evil-collection-comint-setup () (defun evil-collection-comint-setup ()
"Set up `evil' bindings for `comint'." "Set up `evil' bindings for `comint'."
(when evil-want-C-d-scroll (when evil-want-C-d-scroll
(evil-collection-define-key 'normal 'comint 'comint-mode-map (evil-collection-define-key 'normal 'comint-mode-map
(kbd "C-d") #'evil-scroll-down)) (kbd "C-d") #'evil-scroll-down))
(evil-collection-define-key 'normal 'comint 'comint-mode-map (evil-collection-define-key 'normal 'comint-mode-map
(kbd "C-j") #'comint-next-input (kbd "C-j") #'comint-next-input
(kbd "C-k") #'comint-previous-input (kbd "C-k") #'comint-previous-input
(kbd "gj") #'comint-next-input (kbd "gj") #'comint-next-input
@ -46,7 +46,7 @@
(kbd "]") #'comint-next-input (kbd "]") #'comint-next-input
(kbd "[") #'comint-previous-input) (kbd "[") #'comint-previous-input)
(evil-collection-define-key 'insert 'comint 'comint-mode-map (evil-collection-define-key 'insert 'comint-mode-map
(kbd "<up>") #'comint-previous-input (kbd "<up>") #'comint-previous-input
(kbd "<down>") #'comint-next-input)) (kbd "<down>") #'comint-next-input))

View File

@ -37,7 +37,7 @@
"Set up `evil' bindings for `compile'." "Set up `evil' bindings for `compile'."
(evil-set-initial-state 'compilation-mode 'normal) (evil-set-initial-state 'compilation-mode 'normal)
(evil-collection-define-key 'normal 'compile 'compilation-mode-map (evil-collection-define-key 'normal 'compilation-mode-map
"g?" 'describe-mode "g?" 'describe-mode
"?" evil-collection-evil-search-backward "?" evil-collection-evil-search-backward
"gg" 'evil-goto-first-line "gg" 'evil-goto-first-line

View File

@ -38,7 +38,7 @@
(evil-set-initial-state 'custom-new-theme-mode 'normal) (evil-set-initial-state 'custom-new-theme-mode 'normal)
(evil-set-initial-state 'custom-theme-choose-mode 'normal) (evil-set-initial-state 'custom-theme-choose-mode 'normal)
(evil-collection-define-key 'normal 'cus-theme 'custom-theme-choose-mode-map (evil-collection-define-key 'normal 'custom-theme-choose-mode-map
"gj" 'widget-forward "gj" 'widget-forward
"gk" 'widget-backward "gk" 'widget-backward
(kbd "]") 'widget-forward (kbd "]") 'widget-forward
@ -47,7 +47,7 @@
(kbd "C-k") 'widget-backward (kbd "C-k") 'widget-backward
"K" 'custom-describe-theme) "K" 'custom-describe-theme)
(evil-collection-define-key 'normal 'cus-theme 'custom-new-theme-mode-map (evil-collection-define-key 'normal 'custom-new-theme-mode-map
"gj" 'widget-forward "gj" 'widget-forward
"gk" 'widget-backward "gk" 'widget-backward
(kbd "]") 'widget-forward (kbd "]") 'widget-forward

View File

@ -36,7 +36,7 @@
"Set up `evil' bindings for `Custom-mode'." "Set up `evil' bindings for `Custom-mode'."
(evil-set-initial-state 'Custom-mode 'normal) (evil-set-initial-state 'Custom-mode 'normal)
(evil-collection-define-key 'normal 'cus-edit 'custom-mode-map (evil-collection-define-key 'normal 'custom-mode-map
;; motion ;; motion
(kbd "<tab>") 'widget-forward (kbd "<tab>") 'widget-forward
(kbd "S-<tab>") 'widget-backward (kbd "S-<tab>") 'widget-backward

View File

@ -35,7 +35,7 @@
(defun evil-collection-daemons-setup () (defun evil-collection-daemons-setup ()
"Set up `evil' bindings for `daemons'." "Set up `evil' bindings for `daemons'."
(evil-collection-define-key '(normal visual) 'daemons 'daemons-mode-map (evil-collection-define-key '(normal visual) 'daemons-mode-map
(kbd "RET") #'daemons-status-at-point (kbd "RET") #'daemons-status-at-point
"s" #'daemons-start-at-point "s" #'daemons-start-at-point
"S" #'daemons-stop-at-point "S" #'daemons-stop-at-point
@ -49,7 +49,7 @@
"ZQ" #'quit-window) "ZQ" #'quit-window)
;; Functions are available in daemons-output-mode-map as well ;; Functions are available in daemons-output-mode-map as well
(evil-collection-define-key '(normal visual) 'daemons 'daemons-output-mode-map (evil-collection-define-key '(normal visual) 'daemons-output-mode-map
(kbd "RET") #'daemons-status-at-point (kbd "RET") #'daemons-status-at-point
"s" #'daemons-start-at-point "s" #'daemons-start-at-point
"S" #'daemons-stop-at-point "S" #'daemons-stop-at-point

View File

@ -36,7 +36,7 @@
"Set up `evil' bindings for `debbugs-gnu-mode'." "Set up `evil' bindings for `debbugs-gnu-mode'."
(evil-set-initial-state 'debbugs-gnu-mode 'normal) (evil-set-initial-state 'debbugs-gnu-mode 'normal)
(evil-collection-define-key 'normal 'debbugs 'debbugs-gnu-mode-map (evil-collection-define-key 'normal 'debbugs-gnu-mode-map
;; motion ;; motion
(kbd "<tab>") 'forward-button (kbd "<tab>") 'forward-button
(kbd "<backtab>") 'backward-button (kbd "<backtab>") 'backward-button

View File

@ -37,7 +37,7 @@
"Set up `evil' bindings for `debug'." "Set up `evil' bindings for `debug'."
(evil-set-initial-state 'debugger-mode 'normal) (evil-set-initial-state 'debugger-mode 'normal)
(evil-collection-define-key 'normal 'debug 'debugger-mode-map (evil-collection-define-key 'normal 'debugger-mode-map
;; motion ;; motion
(kbd "<tab>") 'forward-button (kbd "<tab>") 'forward-button
(kbd "S-<tab>") 'backward-button (kbd "S-<tab>") 'backward-button

View File

@ -87,7 +87,7 @@ current file instead."
(evil-set-initial-state 'diff-mode 'motion) (evil-set-initial-state 'diff-mode 'motion)
(evil-collection-define-key 'normal 'diff-mode 'diff-mode-map (evil-collection-define-key 'normal 'diff-mode-map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
(kbd "S-SPC") 'scroll-down-command (kbd "S-SPC") 'scroll-down-command
@ -100,7 +100,7 @@ current file instead."
"\\" 'read-only-mode) ; magit has "\" "\\" 'read-only-mode) ; magit has "\"
(evil-collection-define-key 'motion 'diff-mode 'diff-mode-map (evil-collection-define-key 'motion 'diff-mode-map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
(kbd "S-SPC") 'scroll-down-command (kbd "S-SPC") 'scroll-down-command

View File

@ -34,7 +34,7 @@
(defun evil-collection-dired-setup () (defun evil-collection-dired-setup ()
"Set up `evil' bindings for `dired'." "Set up `evil' bindings for `dired'."
(evil-collection-define-key 'normal 'dired 'dired-mode-map (evil-collection-define-key 'normal 'dired-mode-map
"q" 'quit-window "q" 'quit-window
"j" 'dired-next-line "j" 'dired-next-line
"k" 'dired-previous-line "k" 'dired-previous-line

View File

@ -35,7 +35,7 @@
(defun evil-collection-doc-view-setup () (defun evil-collection-doc-view-setup ()
"Set up `evil' bindings for `doc-view'." "Set up `evil' bindings for `doc-view'."
(evil-set-initial-state 'doc-view-mode 'normal) (evil-set-initial-state 'doc-view-mode 'normal)
(evil-collection-define-key 'normal 'doc-view 'doc-view-mode-map (evil-collection-define-key 'normal 'doc-view-mode-map
"q" 'quit-window "q" 'quit-window
(kbd "C-j") 'doc-view-next-page (kbd "C-j") 'doc-view-next-page
(kbd "C-k") 'doc-view-previous-page (kbd "C-k") 'doc-view-previous-page
@ -76,7 +76,7 @@
;; TODO: What if the user changes `evil-want-C-u-scroll' after this is run? ;; TODO: What if the user changes `evil-want-C-u-scroll' after this is run?
(when evil-want-C-u-scroll (when evil-want-C-u-scroll
(evil-collection-define-key 'normal 'doc-view 'doc-view-mode-map (evil-collection-define-key 'normal 'doc-view-mode-map
(kbd "C-u") 'backward-page))) (kbd "C-u") 'backward-page)))
(provide 'evil-collection-doc-view) (provide 'evil-collection-doc-view)

View File

@ -46,7 +46,7 @@
;; FIXME: Seems like other minor modes will readily clash with `edebug'. ;; FIXME: Seems like other minor modes will readily clash with `edebug'.
;; `lispyville' and `edebug' 's' key? ;; `lispyville' and `edebug' 's' key?
(evil-collection-define-key 'normal 'edebug 'edebug-mode-map (evil-collection-define-key 'normal 'edebug-mode-map
;; control ;; control
"s" 'edebug-step-mode "s" 'edebug-step-mode
"n" 'edebug-next-mode "n" 'edebug-next-mode
@ -108,12 +108,12 @@
(kbd "C-c C-l") 'edebug-where) (kbd "C-c C-l") 'edebug-where)
(with-eval-after-load 'edebug-x (with-eval-after-load 'edebug-x
(evil-collection-define-key 'normal 'edebug 'edebug-x-instrumented-function-list-mode-map (evil-collection-define-key 'normal 'edebug-x-instrumented-function-list-mode-map
"E" 'edebug-x-evaluate-function "E" 'edebug-x-evaluate-function
"Q" 'edebug-x-clear-data "Q" 'edebug-x-clear-data
(kbd "<return>") 'edebug-x-find-function (kbd "<return>") 'edebug-x-find-function
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'edebug 'edebug-x-breakpoint-list-mode-map (evil-collection-define-key 'normal 'edebug-x-breakpoint-list-mode-map
(kbd "<return>") 'edebug-x-visit-breakpoint (kbd "<return>") 'edebug-x-visit-breakpoint
"x" 'edebug-x-kill-breakpoint "x" 'edebug-x-kill-breakpoint
"Q" 'edebug-x-clear-data "Q" 'edebug-x-clear-data

View File

@ -39,9 +39,9 @@
(defun evil-collection-elfeed-setup () (defun evil-collection-elfeed-setup ()
"Set up `evil' bindings for `elfeed'." "Set up `evil' bindings for `elfeed'."
(evil-collection-util-inhibit-insert-state elfeed elfeed-search-mode-map) (evil-collection-util-inhibit-insert-state elfeed-search-mode-map)
(evil-set-initial-state 'elfeed-search-mode 'normal) (evil-set-initial-state 'elfeed-search-mode 'normal)
(evil-collection-define-key 'normal 'elfeed 'elfeed-search-mode-map (evil-collection-define-key 'normal 'elfeed-search-mode-map
;; open ;; open
(kbd "<return>") 'elfeed-search-show-entry (kbd "<return>") 'elfeed-search-show-entry
(kbd "S-<return>") 'elfeed-search-browse-url (kbd "S-<return>") 'elfeed-search-browse-url
@ -65,15 +65,15 @@
"ZQ" 'quit-window "ZQ" 'quit-window
"ZZ" 'quit-window) "ZZ" 'quit-window)
(evil-collection-define-key '(normal visual) 'elfeed 'elfeed-search-mode-map (evil-collection-define-key '(normal visual) 'elfeed-search-mode-map
"+" 'elfeed-search-tag-all "+" 'elfeed-search-tag-all
"-" 'elfeed-search-untag-all "-" 'elfeed-search-untag-all
"U" 'elfeed-search-tag-all-unread "U" 'elfeed-search-tag-all-unread
"u" 'elfeed-search-untag-all-unread) "u" 'elfeed-search-untag-all-unread)
(evil-collection-util-inhibit-insert-state elfeed elfeed-show-mode-map) (evil-collection-util-inhibit-insert-state elfeed-show-mode-map)
(evil-set-initial-state 'elfeed-show-mode 'normal) (evil-set-initial-state 'elfeed-show-mode 'normal)
(evil-collection-define-key 'normal 'elfeed 'elfeed-show-mode-map (evil-collection-define-key 'normal 'elfeed-show-mode-map
(kbd "S-<return>") 'elfeed-show-visit (kbd "S-<return>") 'elfeed-show-visit
"go" 'elfeed-show-visit "go" 'elfeed-show-visit
@ -105,7 +105,7 @@
"ZQ" 'elfeed-kill-buffer "ZQ" 'elfeed-kill-buffer
"ZZ" 'elfeed-kill-buffer) "ZZ" 'elfeed-kill-buffer)
(evil-collection-define-key 'operator 'elfeed 'elfeed-show-mode-map (evil-collection-define-key 'operator 'elfeed-show-mode-map
;; Like `eww'. ;; Like `eww'.
"u" '(menu-item "u" '(menu-item
"" ""

View File

@ -35,7 +35,7 @@
(defun evil-collection-elisp-refs-setup () (defun evil-collection-elisp-refs-setup ()
"Set up `evil' bindings for `elisp-refs'." "Set up `evil' bindings for `elisp-refs'."
(evil-collection-define-key 'normal 'elisp-refs 'elisp-refs-mode-map (evil-collection-define-key 'normal 'elisp-refs-mode-map
(kbd "<tab>") 'elisp-refs-next-match (kbd "<tab>") 'elisp-refs-next-match
(kbd "<backtab>") 'elisp-refs-prev-match (kbd "<backtab>") 'elisp-refs-prev-match
(kbd "C-j") 'elisp-refs-next-match (kbd "C-j") 'elisp-refs-next-match

View File

@ -73,9 +73,9 @@ The return value is the yanked text."
"Set up `evil' bindings for `emms-browser'." "Set up `evil' bindings for `emms-browser'."
;; TODO: Why doesn't evil-set-initial-state work with emms-browser-mode? ;; TODO: Why doesn't evil-set-initial-state work with emms-browser-mode?
(evil-collection-util-inhibit-insert-state emms emms-browser-mode-map) (evil-collection-util-inhibit-insert-state emms-browser-mode-map)
(add-hook 'emms-browser-mode-hook 'evil-normal-state) (add-hook 'emms-browser-mode-hook 'evil-normal-state)
(evil-collection-define-key 'normal 'emms 'emms-browser-mode-map (evil-collection-define-key 'normal 'emms-browser-mode-map
;; playback controls ;; playback controls
"x" 'emms-pause "x" 'emms-pause
"X" 'emms-stop "X" 'emms-stop
@ -144,7 +144,7 @@ The return value is the yanked text."
(evil-collection-emms-browser-setup)) (evil-collection-emms-browser-setup))
(evil-set-initial-state 'emms-playlist-mode 'normal) (evil-set-initial-state 'emms-playlist-mode 'normal)
(evil-collection-define-key 'normal 'emms 'emms-playlist-mode-map (evil-collection-define-key 'normal 'emms-playlist-mode-map
;; playback controls ;; playback controls
"x" 'emms-pause "x" 'emms-pause
"X" 'emms-stop "X" 'emms-stop
@ -197,15 +197,15 @@ The return value is the yanked text."
(kbd "M-y") 'emms-playlist-mode-yank-pop) (kbd "M-y") 'emms-playlist-mode-yank-pop)
(evil-collection-define-key 'visual 'emms 'emms-playlist-mode-map (evil-collection-define-key 'visual 'emms-playlist-mode-map
;; "d" 'emms-playlist-mode-kill ;; "d" 'emms-playlist-mode-kill
"D" 'emms-playlist-mode-kill) "D" 'emms-playlist-mode-kill)
(evil-collection-define-key 'normal 'emms 'emms-browser-search-mode-map (evil-collection-define-key 'normal 'emms-browser-search-mode-map
"q" 'emms-browser-kill-search) "q" 'emms-browser-kill-search)
(evil-set-initial-state 'emms-metaplaylist-mode 'normal) (evil-set-initial-state 'emms-metaplaylist-mode 'normal)
(evil-collection-define-key 'normal 'emms 'emms-metaplaylist-mode-map (evil-collection-define-key 'normal 'emms-metaplaylist-mode-map
(kbd "<return>") 'emms-metaplaylist-mode-goto-current (kbd "<return>") 'emms-metaplaylist-mode-goto-current
(kbd "<space>") 'emms-metaplaylist-mode-set-active (kbd "<space>") 'emms-metaplaylist-mode-set-active
"gr" 'emms-metaplaylist-mode-update "gr" 'emms-metaplaylist-mode-update

View File

@ -36,7 +36,7 @@
epa-info-mode-map)) epa-info-mode-map))
(defun evil-collection-epa-setup () (defun evil-collection-epa-setup ()
(evil-collection-define-key 'normal 'epa 'epa-key-list-mode-map (evil-collection-define-key 'normal 'epa-key-list-mode-map
(kbd "<tab>") 'widget-forward (kbd "<tab>") 'widget-forward
"gr" 'revert-buffer "gr" 'revert-buffer
"q" 'epa-exit-buffer "q" 'epa-exit-buffer
@ -56,12 +56,12 @@
"i" 'epa-import-keys "i" 'epa-import-keys
"o" 'epa-export-keys) "o" 'epa-export-keys)
(evil-collection-define-key 'normal 'epa 'epa-key-mode-map (evil-collection-define-key 'normal 'epa-key-mode-map
"q" 'epa-exit-buffer "q" 'epa-exit-buffer
"ZZ" 'quit-window "ZZ" 'quit-window
"ZQ" 'evil-quit) "ZQ" 'evil-quit)
(evil-collection-define-key 'normal 'epa 'epa-info-mode-map (evil-collection-define-key 'normal 'epa-info-mode-map
"q" 'delete-window "q" 'delete-window
"ZZ" 'quit-window "ZZ" 'quit-window
"ZQ" 'evil-quit)) "ZQ" 'evil-quit))

View File

@ -36,7 +36,7 @@
"Set up `evil' bindings for `ert'." "Set up `evil' bindings for `ert'."
(evil-set-initial-state 'ert-results-mode 'normal) (evil-set-initial-state 'ert-results-mode 'normal)
(evil-collection-define-key 'normal 'ert 'ert-results-mode-map (evil-collection-define-key 'normal 'ert-results-mode-map
"j" 'evil-next-line "j" 'evil-next-line
"k" 'evil-previous-line "k" 'evil-previous-line
"h" 'evil-backward-char "h" 'evil-backward-char

View File

@ -55,7 +55,7 @@
;;; need to add bindings to `eshell-first-time-mode-hook'. ;;; need to add bindings to `eshell-first-time-mode-hook'.
(defun evil-collection-eshell-setup-keys () (defun evil-collection-eshell-setup-keys ()
"Set up `evil' bindings for `eshell'." "Set up `evil' bindings for `eshell'."
(evil-collection-define-key 'normal 'eshell 'eshell-mode-map (evil-collection-define-key 'normal 'eshell-mode-map
;; motion ;; motion
"[" 'eshell-previous-prompt "[" 'eshell-previous-prompt
"]" 'eshell-next-prompt "]" 'eshell-next-prompt
@ -70,11 +70,11 @@
(kbd "<return>") 'eshell-send-input (kbd "<return>") 'eshell-send-input
(kbd "C-c C-c") 'evil-collection-eshell-interrupt-process) (kbd "C-c C-c") 'evil-collection-eshell-interrupt-process)
(evil-collection-define-key 'insert 'eshell 'eshell-mode-map (evil-collection-define-key 'insert 'eshell-mode-map
;; motion ;; motion
(kbd "M-h") 'eshell-backward-argument (kbd "M-h") 'eshell-backward-argument
(kbd "M-l") 'eshell-forward-argument) (kbd "M-l") 'eshell-forward-argument)
(evil-collection-define-key 'visual 'eshell 'eshell-mode-map (evil-collection-define-key 'visual 'eshell-mode-map
;; motion ;; motion
;; TODO: This does not work with `evil-visual-line'. ;; TODO: This does not work with `evil-visual-line'.
"[" 'eshell-previous-prompt "[" 'eshell-previous-prompt

View File

@ -38,7 +38,7 @@
(defun evil-collection-eww-setup () (defun evil-collection-eww-setup ()
"Set up `evil' bindings for `eww'." "Set up `evil' bindings for `eww'."
(evil-collection-define-key 'normal 'eww 'eww-mode-map (evil-collection-define-key 'normal 'eww-mode-map
"^" 'eww-up-url "^" 'eww-up-url
"u" 'eww-up-url "u" 'eww-up-url
"U" 'eww-top-url "U" 'eww-top-url
@ -87,7 +87,7 @@
"ZQ" 'quit-window "ZQ" 'quit-window
"ZZ" 'quit-window) "ZZ" 'quit-window)
(evil-collection-define-key 'operator 'eww 'eww-mode-map (evil-collection-define-key 'operator 'eww-mode-map
"u" '(menu-item "u" '(menu-item
"" ""
nil nil
@ -97,9 +97,9 @@
(setq evil-inhibit-operator t) (setq evil-inhibit-operator t)
#'eww-copy-page-url)))) #'eww-copy-page-url))))
(evil-collection-util-inhibit-insert-state eww eww-history-mode-map) (evil-collection-util-inhibit-insert-state eww-history-mode-map)
(evil-set-initial-state 'eww-history-mode 'normal) (evil-set-initial-state 'eww-history-mode 'normal)
(evil-collection-define-key 'normal 'eww 'eww-history-mode-map (evil-collection-define-key 'normal 'eww-history-mode-map
(kbd "<return>") 'eww-history-browse (kbd "<return>") 'eww-history-browse
;; refresh ;; refresh
"gr" 'revert-buffer "gr" 'revert-buffer
@ -108,9 +108,9 @@
"ZQ" 'quit-window "ZQ" 'quit-window
"ZZ" 'quit-window) "ZZ" 'quit-window)
(evil-collection-util-inhibit-insert-state eww eww-buffers-mode-map) (evil-collection-util-inhibit-insert-state eww-buffers-mode-map)
(evil-set-initial-state 'eww-buffers-mode 'normal) (evil-set-initial-state 'eww-buffers-mode 'normal)
(evil-collection-define-key 'normal 'eww 'eww-buffers-mode-map (evil-collection-define-key 'normal 'eww-buffers-mode-map
"D" 'eww-buffer-kill "D" 'eww-buffer-kill
(kbd "<return>") 'eww-buffer-select (kbd "<return>") 'eww-buffer-select
"]" 'eww-buffer-show-next "]" 'eww-buffer-show-next
@ -124,9 +124,9 @@
"ZQ" 'quit-window "ZQ" 'quit-window
"ZZ" 'quit-window) "ZZ" 'quit-window)
(evil-collection-util-inhibit-insert-state eww eww-bookmark-mode-map) (evil-collection-util-inhibit-insert-state eww-bookmark-mode-map)
(evil-set-initial-state 'eww-bookmark-mode 'normal) (evil-set-initial-state 'eww-bookmark-mode 'normal)
(evil-collection-define-key 'normal 'eww 'eww-bookmark-mode-map (evil-collection-define-key 'normal 'eww-bookmark-mode-map
"D" 'eww-bookmark-kill "D" 'eww-bookmark-kill
"P" 'eww-bookmark-yank "P" 'eww-bookmark-yank
@ -138,7 +138,7 @@
"ZQ" 'quit-window "ZQ" 'quit-window
"ZZ" 'quit-window) "ZZ" 'quit-window)
(evil-collection-define-key 'operator 'eww 'eww-bookmark-mode-map (evil-collection-define-key 'operator 'eww-bookmark-mode-map
"u" '(menu-item "u" '(menu-item
"" ""
nil nil

View File

@ -37,7 +37,7 @@
(defun evil-collection-flycheck-setup () (defun evil-collection-flycheck-setup ()
"Set up `evil' bindings for `flycheck'." "Set up `evil' bindings for `flycheck'."
(evil-set-initial-state 'flycheck-error-list-mode 'normal) (evil-set-initial-state 'flycheck-error-list-mode 'normal)
(evil-collection-define-key 'normal 'flycheck 'flycheck-error-list-mode-map (evil-collection-define-key 'normal 'flycheck-error-list-mode-map
"gj" 'flycheck-error-list-next-error "gj" 'flycheck-error-list-next-error
"gk" 'flycheck-error-list-previous-error "gk" 'flycheck-error-list-previous-error
(kbd "C-j") 'flycheck-error-list-next-error (kbd "C-j") 'flycheck-error-list-next-error

View File

@ -43,7 +43,7 @@
(add-hook 'free-keys-mode-hook (add-hook 'free-keys-mode-hook
#'evil-collection-free-keys-set-header-line-format) #'evil-collection-free-keys-set-header-line-format)
(evil-set-initial-state 'free-keys-mode 'normal) (evil-set-initial-state 'free-keys-mode 'normal)
(evil-collection-define-key 'normal 'free-keys 'free-keys-mode-map (evil-collection-define-key 'normal 'free-keys-mode-map
"c" 'free-keys-change-buffer "c" 'free-keys-change-buffer
"p" 'free-keys-set-prefix "p" 'free-keys-set-prefix
"q" 'quit-window)) "q" 'quit-window))

View File

@ -56,10 +56,10 @@
(evil-set-initial-state 'geiser-debug-mode 'normal) (evil-set-initial-state 'geiser-debug-mode 'normal)
(evil-set-initial-state 'geiser-doc-mode 'normal) (evil-set-initial-state 'geiser-doc-mode 'normal)
(evil-collection-define-key 'normal 'geiser 'geiser-debug-mode-map (evil-collection-define-key 'normal 'geiser-debug-mode-map
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'geiser 'geiser-doc-mode-map (evil-collection-define-key 'normal 'geiser-doc-mode-map
(kbd "<tab>") 'forward-button (kbd "<tab>") 'forward-button
(kbd "<S-tab>") 'backward-button (kbd "<S-tab>") 'backward-button
"gd" 'geiser-edit-symbol-at-point "gd" 'geiser-edit-symbol-at-point
@ -78,10 +78,10 @@
"x" 'geiser-doc-kill-page "x" 'geiser-doc-kill-page
"X" 'geiser-doc-clean-history) "X" 'geiser-doc-clean-history)
(evil-collection-define-key 'insert geiser-repl-mode-map (evil-collection-define-key 'insert 'geiser-repl-mode-map
(kbd "S-<return>") 'geiser-repl--newline-and-indent) (kbd "S-<return>") 'geiser-repl--newline-and-indent)
(evil-collection-define-key 'normal 'geiser 'geiser-repl-mode-map (evil-collection-define-key 'normal 'geiser-repl-mode-map
"gd" 'geiser-edit-symbol-at-point "gd" 'geiser-edit-symbol-at-point
(kbd "C-t") 'geiser-pop-symbol-stack (kbd "C-t") 'geiser-pop-symbol-stack
"gj" 'geiser-repl-next-prompt "gj" 'geiser-repl-next-prompt
@ -92,7 +92,7 @@
"[" 'geiser-repl-previous-prompt "[" 'geiser-repl-previous-prompt
"K" 'geiser-doc-symbol-at-point) "K" 'geiser-doc-symbol-at-point)
(evil-collection-define-key 'normal 'geiser 'geiser-mode-map (evil-collection-define-key 'normal 'geiser-mode-map
"gd" 'geiser-edit-symbol-at-point "gd" 'geiser-edit-symbol-at-point
(kbd "C-t") 'geiser-pop-symbol-stack (kbd "C-t") 'geiser-pop-symbol-stack
"gZ" 'geiser-mode-switch-to-repl-and-enter "gZ" 'geiser-mode-switch-to-repl-and-enter

View File

@ -52,12 +52,12 @@
(when (boundp 'ggtags-enable-navigation-keys) (when (boundp 'ggtags-enable-navigation-keys)
(setq ggtags-enable-navigation-keys nil)) (setq ggtags-enable-navigation-keys nil))
(evil-collection-define-key 'normal 'ggtags 'ggtags-mode-map (evil-collection-define-key 'normal 'ggtags-mode-map
"gd" 'ggtags-find-tag-dwim "gd" 'ggtags-find-tag-dwim
(kbd "C-t") 'ggtags-prev-mark (kbd "C-t") 'ggtags-prev-mark
"gf" 'ggtags-find-file) "gf" 'ggtags-find-file)
(evil-collection-define-key 'normal 'ggtags 'ggtags-view-search-history-mode-map (evil-collection-define-key 'normal 'ggtags-view-search-history-mode-map
"gj" 'ggtags-view-search-history-next "gj" 'ggtags-view-search-history-next
"gk" 'ggtags-view-search-history-prev "gk" 'ggtags-view-search-history-prev
(kbd "C-j") 'ggtags-view-search-history-next (kbd "C-j") 'ggtags-view-search-history-next
@ -70,7 +70,7 @@
"R" 'ggtags-view-search-history-action "R" 'ggtags-view-search-history-action
"q" 'ggtags-kill-window) "q" 'ggtags-kill-window)
(evil-collection-define-key 'normal 'ggtags 'ggtags-view-tag-history-mode-map (evil-collection-define-key 'normal 'ggtags-view-tag-history-mode-map
"gj" 'next-error-no-select "gj" 'next-error-no-select
(kbd "C-j") 'next-error-no-select (kbd "C-j") 'next-error-no-select
"]" 'next-error-no-select "]" 'next-error-no-select
@ -79,7 +79,7 @@
(kbd "[") 'previous-error-no-select (kbd "[") 'previous-error-no-select
"q" 'ggtags-kill-window) "q" 'ggtags-kill-window)
(evil-collection-define-key 'normal 'ggtags 'ggtags-navigation-map (evil-collection-define-key 'normal 'ggtags-navigation-map
;; navigation ;; navigation
"gj" 'next-error "gj" 'next-error
"gk" 'next-error "gk" 'next-error

View File

@ -35,10 +35,10 @@
(defun evil-collection-go-mode-setup () (defun evil-collection-go-mode-setup ()
"Set up `evil' bindings for `go-mode'." "Set up `evil' bindings for `go-mode'."
(evil-collection-define-key 'normal 'go-mode 'go-mode-map (evil-collection-define-key 'normal 'go-mode-map
"gd" 'godef-jump "gd" 'godef-jump
"K" 'godef-describe) "K" 'godef-describe)
(evil-collection-define-key 'normal 'go-mode 'godoc-mode-map (evil-collection-define-key 'normal 'godoc-mode-map
"q" 'quit-window "q" 'quit-window
"g?" 'describe-mode)) "g?" 'describe-mode))

View File

@ -46,8 +46,8 @@
(defmacro evil-collection-guix-set (map) (defmacro evil-collection-guix-set (map)
"Set common bindings in MAP." "Set common bindings in MAP."
`(progn `(progn
(evil-collection-util-inhibit-insert-state guix ,map) (evil-collection-util-inhibit-insert-state ,map)
(evil-collection-define-key 'normal 'guix ',map (evil-collection-define-key 'normal ',map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
(kbd "S-SPC") 'scroll-down-command (kbd "S-SPC") 'scroll-down-command
@ -88,7 +88,7 @@
"Set up `evil' bindings for `guix'." "Set up `evil' bindings for `guix'."
(evil-collection-guix-set guix-ui-map) ; Covers output-list and generation-list. (evil-collection-guix-set guix-ui-map) ; Covers output-list and generation-list.
(evil-collection-define-key 'normal 'guix 'guix-output-list-mode-map (evil-collection-define-key 'normal 'guix-output-list-mode-map
(kbd "<return>") 'bui-list-describe (kbd "<return>") 'bui-list-describe
"gb" 'guix-package-list-latest-builds "gb" 'guix-package-list-latest-builds
@ -106,7 +106,7 @@
"x" 'guix-output-list-execute) "x" 'guix-output-list-execute)
(evil-collection-guix-set guix-package-info-mode-map) (evil-collection-guix-set guix-package-info-mode-map)
(evil-collection-define-key 'normal 'guix 'guix-package-info-mode-map (evil-collection-define-key 'normal 'guix-package-info-mode-map
"gG" 'guix-package-info-graph "gG" 'guix-package-info-graph
"gl" 'guix-package-info-lint "gl" 'guix-package-info-lint
"gs" 'guix-package-info-size "gs" 'guix-package-info-size
@ -117,7 +117,7 @@
"i" 'guix-package-info-install) "i" 'guix-package-info-install)
(evil-collection-guix-set guix-profile-list-mode-map) (evil-collection-guix-set guix-profile-list-mode-map)
(evil-collection-define-key 'normal 'guix 'guix-profile-list-mode-map (evil-collection-define-key 'normal 'guix-profile-list-mode-map
(kbd "<return>") 'bui-list-describe (kbd "<return>") 'bui-list-describe
"c" 'guix-profile-list-set-current ; TODO: Bind to "." as per the rationale? "c" 'guix-profile-list-set-current ; TODO: Bind to "." as per the rationale?
@ -126,7 +126,7 @@
"P" 'guix-profile-list-show-search-paths) "P" 'guix-profile-list-show-search-paths)
(evil-collection-guix-set guix-profile-info-mode-map) (evil-collection-guix-set guix-profile-info-mode-map)
(evil-collection-define-key 'normal 'guix 'guix-profile-info-mode-map (evil-collection-define-key 'normal 'guix-profile-info-mode-map
"gm" 'guix-profile-info-apply-manifest "gm" 'guix-profile-info-apply-manifest
"p" 'guix-profile-info-show-packages "p" 'guix-profile-info-show-packages
@ -134,7 +134,7 @@
"P" 'guix-profile-info-show-search-paths "P" 'guix-profile-info-show-search-paths
"c" 'guix-profile-info-set-current) "c" 'guix-profile-info-set-current)
(evil-collection-define-key 'normal 'guix 'guix-generation-list-mode-map (evil-collection-define-key 'normal 'guix-generation-list-mode-map
(kbd "<return>") 'bui-list-describe (kbd "<return>") 'bui-list-describe
"p" 'guix-generation-list-show-packages "p" 'guix-generation-list-show-packages
@ -151,7 +151,7 @@
"x" 'guix-generation-list-execute) "x" 'guix-generation-list-execute)
(evil-collection-guix-set guix-license-list-mode-map) (evil-collection-guix-set guix-license-list-mode-map)
(evil-collection-define-key 'normal 'guix 'guix-license-list-mode-map (evil-collection-define-key 'normal 'guix-license-list-mode-map
(kbd "<tab>") 'forward-button ; Why isn't this binding inhibited? (kbd "<tab>") 'forward-button ; Why isn't this binding inhibited?
(kbd "<return>") 'bui-list-describe (kbd "<return>") 'bui-list-describe
@ -161,14 +161,14 @@
(evil-collection-guix-set guix-license-info-mode-map) (evil-collection-guix-set guix-license-info-mode-map)
(evil-collection-guix-set guix-location-list-mode-map) (evil-collection-guix-set guix-location-list-mode-map)
(evil-collection-define-key 'normal 'guix 'guix-location-list-mode-map (evil-collection-define-key 'normal 'guix-location-list-mode-map
(kbd "<return>") 'guix-location-list-show-packages ; In Emacs state, it seems to be overriden by `push-button'. (kbd "<return>") 'guix-location-list-show-packages ; In Emacs state, it seems to be overriden by `push-button'.
"p" 'guix-location-list-show-packages "p" 'guix-location-list-show-packages
"gd" 'guix-location-list-edit) "gd" 'guix-location-list-edit)
(evil-collection-guix-set guix-hydra-build-list-mode-map) (evil-collection-guix-set guix-hydra-build-list-mode-map)
(evil-collection-define-key 'normal 'guix 'guix-hydra-build-list-mode-map (evil-collection-define-key 'normal 'guix-hydra-build-list-mode-map
(kbd "<return>") 'bui-list-describe (kbd "<return>") 'bui-list-describe
"gb" 'guix-hydra-build-list-latest-builds "gb" 'guix-hydra-build-list-latest-builds
@ -176,8 +176,8 @@
(evil-collection-guix-set guix-hydra-build-info-mode-map) (evil-collection-guix-set guix-hydra-build-info-mode-map)
(evil-collection-util-inhibit-insert-state guix guix-build-log-mode-map) (evil-collection-util-inhibit-insert-state guix-build-log-mode-map)
(evil-collection-define-key 'normal 'guix 'guix-build-log-mode-map (evil-collection-define-key 'normal 'guix-build-log-mode-map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
(kbd "S-SPC") 'scroll-down-command (kbd "S-SPC") 'scroll-down-command
@ -201,7 +201,7 @@
"ZQ" 'evil-quit "ZQ" 'evil-quit
"ZZ" 'quit-window) "ZZ" 'quit-window)
(evil-collection-define-key 'normal 'guix 'guix-devel-mode-map (evil-collection-define-key 'normal 'guix-devel-mode-map
;; repl ;; repl
"gz" 'guix-switch-to-repl)) "gz" 'guix-switch-to-repl))

View File

@ -104,7 +104,7 @@
(add-hook 'helm-minibuffer-set-up-hook 'evil-collection-helm-hide-minibuffer-maybe) (add-hook 'helm-minibuffer-set-up-hook 'evil-collection-helm-hide-minibuffer-maybe)
(setq helm-default-prompt-display-function 'evil-collection-helm--set-prompt-display) (setq helm-default-prompt-display-function 'evil-collection-helm--set-prompt-display)
(evil-collection-define-key '(insert normal) 'helm 'helm-map (evil-collection-define-key '(insert normal) 'helm-map
(kbd "M-[") 'helm-previous-source (kbd "M-[") 'helm-previous-source
(kbd "M-]") 'helm-next-source (kbd "M-]") 'helm-next-source
(kbd "M-l") 'helm-execute-persistent-action (kbd "M-l") 'helm-execute-persistent-action
@ -114,38 +114,38 @@
(kbd "C-b") 'helm-previous-page) (kbd "C-b") 'helm-previous-page)
(dolist (map (list helm-find-files-map helm-read-file-map)) (dolist (map (list helm-find-files-map helm-read-file-map))
(evil-collection-define-key* 'normal 'helm map (evil-collection-define-key* 'normal map
"go" 'helm-ff-run-switch-other-window "go" 'helm-ff-run-switch-other-window
"/" 'helm-ff-run-find-sh-command) "/" 'helm-ff-run-find-sh-command)
(evil-collection-define-key* '(insert normal) 'helm map (evil-collection-define-key* '(insert normal) map
(kbd "S-<return>") 'helm-ff-run-switch-other-window (kbd "S-<return>") 'helm-ff-run-switch-other-window
(kbd "M-h") 'helm-find-files-up-one-level)) (kbd "M-h") 'helm-find-files-up-one-level))
;; TODO: Change the Helm header to display "M-l" instead of "C-l". We don't ;; TODO: Change the Helm header to display "M-l" instead of "C-l". We don't
;; want to modify the Emacs Helm map. ;; want to modify the Emacs Helm map.
(evil-collection-define-key '(insert normal) 'helm helm-generic-files-map (kbd "S-<return>") 'helm-ff-run-switch-other-window) (evil-collection-define-key '(insert normal) helm-generic-files-map (kbd "S-<return>") 'helm-ff-run-switch-other-window)
(evil-collection-define-key '(insert normal) 'helm helm-buffer-map (kbd "S-<return>") 'helm-buffer-switch-other-window) (evil-collection-define-key '(insert normal) helm-buffer-map (kbd "S-<return>") 'helm-buffer-switch-other-window)
(evil-collection-define-key '(insert normal) 'helm helm-buffer-map (kbd "M-<return>") 'display-buffer) (evil-collection-define-key '(insert normal) helm-buffer-map (kbd "M-<return>") 'display-buffer)
(evil-collection-define-key '(insert normal) 'helm helm-moccur-map (kbd "S-<return>") 'helm-moccur-run-goto-line-ow) (evil-collection-define-key '(insert normal) helm-moccur-map (kbd "S-<return>") 'helm-moccur-run-goto-line-ow)
(evil-collection-define-key '(insert normal) 'helm helm-grep-map (kbd "S-<return>") 'helm-grep-run-other-window-action) (evil-collection-define-key '(insert normal) helm-grep-map (kbd "S-<return>") 'helm-grep-run-other-window-action)
(evil-collection-define-key 'normal 'helm helm-generic-files-map "go" 'helm-ff-run-switch-other-window) (evil-collection-define-key 'normal helm-generic-files-map "go" 'helm-ff-run-switch-other-window)
(evil-collection-define-key 'normal 'helm helm-buffer-map "go" 'helm-buffer-switch-other-window) (evil-collection-define-key 'normal helm-buffer-map "go" 'helm-buffer-switch-other-window)
(evil-collection-define-key 'normal 'helm helm-buffer-map "gO" 'display-buffer) (evil-collection-define-key 'normal helm-buffer-map "gO" 'display-buffer)
(evil-collection-define-key 'normal 'helm helm-moccur-map "go" 'helm-moccur-run-goto-line-ow) (evil-collection-define-key 'normal helm-moccur-map "go" 'helm-moccur-run-goto-line-ow)
(evil-collection-define-key 'normal 'helm helm-grep-map "go" 'helm-grep-run-other-window-action) (evil-collection-define-key 'normal helm-grep-map "go" 'helm-grep-run-other-window-action)
(evil-collection-define-key 'normal 'helm helm-buffer-map (evil-collection-define-key 'normal helm-buffer-map
"=" 'helm-buffer-run-ediff "=" 'helm-buffer-run-ediff
"%" 'helm-buffer-run-query-replace-regexp "%" 'helm-buffer-run-query-replace-regexp
"D" 'helm-buffer-run-kill-persistent) ; Ivy has "D". "D" 'helm-buffer-run-kill-persistent) ; Ivy has "D".
(evil-collection-define-key 'normal 'helm helm-find-files-map (evil-collection-define-key 'normal helm-find-files-map
"=" 'helm-ff-run-ediff-file "=" 'helm-ff-run-ediff-file
"%" 'helm-ff-run-query-replace-regexp "%" 'helm-ff-run-query-replace-regexp
"D" 'helm-ff-run-delete-file) ; Ivy has "D". "D" 'helm-ff-run-delete-file) ; Ivy has "D".
(evil-collection-define-key 'normal 'helm helm-map (evil-collection-define-key 'normal helm-map
(kbd "<tab>") 'helm-select-action ; TODO: Ivy has "ga". (kbd "<tab>") 'helm-select-action ; TODO: Ivy has "ga".
(kbd "[") 'helm-previous-source (kbd "[") 'helm-previous-source
(kbd "]") 'helm-next-source (kbd "]") 'helm-next-source

View File

@ -35,7 +35,7 @@
(defun evil-collection-help-setup () (defun evil-collection-help-setup ()
"Set up `evil' bindings for `help'." "Set up `evil' bindings for `help'."
(evil-set-initial-state 'help-mode 'normal) (evil-set-initial-state 'help-mode 'normal)
(evil-collection-define-key 'normal 'help-mode 'help-mode-map (evil-collection-define-key 'normal 'help-mode-map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
(kbd "S-SPC") 'scroll-down-command (kbd "S-SPC") 'scroll-down-command

View File

@ -36,12 +36,12 @@
"Set up `evil' bindings for `ibuffer'." "Set up `evil' bindings for `ibuffer'."
(evil-set-initial-state 'ibuffer-mode 'normal) (evil-set-initial-state 'ibuffer-mode 'normal)
(evil-collection-define-key 'normal 'ibuffer 'ibuffer-mode-map (evil-collection-define-key 'normal 'ibuffer-mode-map
(kbd "C-d") (if evil-want-C-d-scroll (kbd "C-d") (if evil-want-C-d-scroll
'evil-scroll-down 'evil-scroll-down
'ibuffer-mark-for-delete-backwards)) 'ibuffer-mark-for-delete-backwards))
(evil-collection-define-key 'normal 'ibuffer 'ibuffer-mode-map (evil-collection-define-key 'normal 'ibuffer-mode-map
(kbd "=") 'ibuffer-diff-with-file (kbd "=") 'ibuffer-diff-with-file
(kbd "J") 'ibuffer-jump-to-buffer (kbd "J") 'ibuffer-jump-to-buffer
(kbd "M-g") 'ibuffer-jump-to-buffer (kbd "M-g") 'ibuffer-jump-to-buffer

View File

@ -34,7 +34,7 @@
(defun evil-collection-image+-setup () (defun evil-collection-image+-setup ()
"Set up `evil' bindings for `image+'." "Set up `evil' bindings for `image+'."
(evil-collection-define-key 'normal 'image+ 'image-mode-map (evil-collection-define-key 'normal 'image-mode-map
;; zoom ;; zoom
"+" 'imagex-sticky-zoom-in "+" 'imagex-sticky-zoom-in
"=" 'imagex-sticky-zoom-in "=" 'imagex-sticky-zoom-in

View File

@ -39,7 +39,7 @@
"Set up `evil' bindings for `image-mode'." "Set up `evil' bindings for `image-mode'."
(evil-set-initial-state 'image-mode 'normal) (evil-set-initial-state 'image-mode 'normal)
(evil-collection-define-key 'normal 'image-mode 'image-mode-map (evil-collection-define-key 'normal 'image-mode-map
;; motion ;; motion
"gg" 'image-bob "gg" 'image-bob
"G" 'image-eob "G" 'image-eob
@ -84,7 +84,7 @@
;; TODO: What if the user changes `evil-want-C-u-scroll' after this is run? ;; TODO: What if the user changes `evil-want-C-u-scroll' after this is run?
(when evil-want-C-u-scroll (when evil-want-C-u-scroll
(evil-collection-define-key 'normal 'image-mode 'image-mode-map (evil-collection-define-key 'normal 'image-mode-map
(kbd "C-u") 'image-scroll-down))) (kbd "C-u") 'image-scroll-down)))
(provide 'evil-collection-image) (provide 'evil-collection-image)

View File

@ -40,7 +40,7 @@
(defun evil-collection-indium-setup () (defun evil-collection-indium-setup ()
"Set up `evil' bindings for `indium'." "Set up `evil' bindings for `indium'."
(when evil-collection-settings-setup-debugger-keys (when evil-collection-settings-setup-debugger-keys
(evil-collection-define-key 'normal 'indium 'indium-debugger-mode-map (evil-collection-define-key 'normal 'indium-debugger-mode-map
"n" 'indium-debugger-step-over "n" 'indium-debugger-step-over
"i" 'indium-debugger-step-into "i" 'indium-debugger-step-into
"o" 'indium-debugger-step-out "o" 'indium-debugger-step-out
@ -55,7 +55,7 @@
(add-hook 'indium-debugger-mode-hook #'evil-normalize-keymaps)) (add-hook 'indium-debugger-mode-hook #'evil-normalize-keymaps))
(evil-collection-define-key 'normal 'indium 'indium-inspector-mode-map (evil-collection-define-key 'normal 'indium-inspector-mode-map
"q" 'quit-window "q" 'quit-window
(kbd "RET") 'indium-follow-link (kbd "RET") 'indium-follow-link
[mouse-1] 'indium-follow-link [mouse-1] 'indium-follow-link
@ -68,12 +68,12 @@
[tab] 'indium-inspector-next-reference [tab] 'indium-inspector-next-reference
[backtab] 'indium-inspector-previous-reference) [backtab] 'indium-inspector-previous-reference)
(evil-collection-define-key 'normal 'indium 'indium-debugger-locals-mode-map (evil-collection-define-key 'normal 'indium-debugger-locals-mode-map
"q" 'quit-window "q" 'quit-window
"L" nil "L" nil
"gr" nil) "gr" nil)
(evil-collection-define-key 'normal 'indium 'indium-debugger-frames-mode-map (evil-collection-define-key 'normal 'indium-debugger-frames-mode-map
"q" 'quit-window "q" 'quit-window
[return] 'indium-follow-link [return] 'indium-follow-link
(kbd "RET") 'indium-follow-link (kbd "RET") 'indium-follow-link
@ -84,12 +84,12 @@
[tab] 'indium-debugger-frames-next-frame [tab] 'indium-debugger-frames-next-frame
[backtab] 'indium-debugger-frames-previous-frame) [backtab] 'indium-debugger-frames-previous-frame)
(evil-collection-define-key 'normal 'indium 'indium-interaction-mode-map (evil-collection-define-key 'normal 'indium-interaction-mode-map
"gr" 'indium-update-script-source "gr" 'indium-update-script-source
"gz" 'indium-switch-to-repl-buffer) "gz" 'indium-switch-to-repl-buffer)
(when evil-collection-settings-setup-debugger-keys (when evil-collection-settings-setup-debugger-keys
(evil-collection-define-key 'normal 'indium 'indium-interaction-mode-map (evil-collection-define-key 'normal 'indium-interaction-mode-map
[left-fringe mouse-1] 'evil-collection-indium-debugger-mouse-toggle-breakpoint [left-fringe mouse-1] 'evil-collection-indium-debugger-mouse-toggle-breakpoint
[left-margin mouse-1] 'evil-collection-indium-debugger-mouse-toggle-breakpoint [left-margin mouse-1] 'evil-collection-indium-debugger-mouse-toggle-breakpoint
[f5] 'indium-debugger-resume [f5] 'indium-debugger-resume
@ -99,7 +99,7 @@
[f11] 'indium-debugger-step-into [f11] 'indium-debugger-step-into
[S-f11] 'indium-debugger-step-out)) [S-f11] 'indium-debugger-step-out))
(evil-collection-define-key 'normal 'indium 'indium-repl-mode-map (evil-collection-define-key 'normal 'indium-repl-mode-map
(kbd "gj") 'indium-repl-next-input (kbd "gj") 'indium-repl-next-input
(kbd "gk") 'indium-repl-previous-input (kbd "gk") 'indium-repl-previous-input
(kbd "C-j") 'indium-repl-next-input (kbd "C-j") 'indium-repl-next-input

View File

@ -36,9 +36,9 @@
(defun evil-collection-info-setup () (defun evil-collection-info-setup ()
"Set up `evil' bindings for `info-mode'." "Set up `evil' bindings for `info-mode'."
(evil-collection-util-inhibit-insert-state info Info-mode-map) (evil-collection-util-inhibit-insert-state Info-mode-map)
(evil-set-initial-state 'Info-mode 'normal) (evil-set-initial-state 'Info-mode 'normal)
(evil-collection-define-key 'normal 'info 'Info-mode-map (evil-collection-define-key 'normal 'Info-mode-map
(kbd "<tab>") 'Info-next-reference (kbd "<tab>") 'Info-next-reference
(kbd "S-<tab>") 'Info-prev-reference (kbd "S-<tab>") 'Info-prev-reference
@ -97,7 +97,7 @@
"ZQ" 'evil-quit "ZQ" 'evil-quit
"ZZ" 'Info-exit) "ZZ" 'Info-exit)
(evil-collection-define-key 'operator 'info 'Info-mode-map (evil-collection-define-key 'operator 'Info-mode-map
"u" '(menu-item ; Like eww. "u" '(menu-item ; Like eww.
"" ""
nil nil

View File

@ -36,9 +36,9 @@
(defun evil-collection-ivy-setup () (defun evil-collection-ivy-setup ()
"Set up `evil' bindings for `ivy-mode'." "Set up `evil' bindings for `ivy-mode'."
(evil-collection-define-key nil 'ivy 'ivy-mode-map (evil-collection-define-key nil 'ivy-mode-map
(kbd "<escape>") 'minibuffer-keyboard-quit) (kbd "<escape>") 'minibuffer-keyboard-quit)
(evil-collection-define-key 'normal 'ivy 'ivy-occur-mode-map (evil-collection-define-key 'normal 'ivy-occur-mode-map
[mouse-1] 'ivy-occur-click [mouse-1] 'ivy-occur-click
(kbd "<return>") 'ivy-occur-press-and-switch (kbd "<return>") 'ivy-occur-press-and-switch
"j" 'ivy-occur-next-line "j" 'ivy-occur-next-line
@ -59,15 +59,15 @@
"q" 'quit-window) "q" 'quit-window)
(when evil-want-C-d-scroll (when evil-want-C-d-scroll
(evil-collection-define-key 'normal 'ivy 'ivy-occur-grep-mode-map (evil-collection-define-key 'normal 'ivy-occur-grep-mode-map
"D" 'ivy-occur-delete-candidate "D" 'ivy-occur-delete-candidate
(kbd "C-d") 'evil-scroll-down)) (kbd "C-d") 'evil-scroll-down))
(evil-collection-define-key 'visual 'ivy 'ivy-occur-grep-mode-map (evil-collection-define-key 'visual 'ivy-occur-grep-mode-map
"j" 'evil-next-line "j" 'evil-next-line
"k" 'evil-previous-line) "k" 'evil-previous-line)
(evil-collection-define-key 'normal 'ivy 'ivy-occur-grep-mode-map (evil-collection-define-key 'normal 'ivy-occur-grep-mode-map
"d" 'ivy-occur-delete-candidate "d" 'ivy-occur-delete-candidate
(kbd "C-x C-q") 'ivy-wgrep-change-to-wgrep-mode (kbd "C-x C-q") 'ivy-wgrep-change-to-wgrep-mode
"i" 'ivy-wgrep-change-to-wgrep-mode "i" 'ivy-wgrep-change-to-wgrep-mode
@ -91,14 +91,14 @@
(defvar evil-collection-setup-minibuffer) (defvar evil-collection-setup-minibuffer)
(when evil-collection-setup-minibuffer (when evil-collection-setup-minibuffer
(evil-collection-define-key 'normal 'ivy 'ivy-minibuffer-map (evil-collection-define-key 'normal 'ivy-minibuffer-map
(kbd "<escape>") 'abort-recursive-edit (kbd "<escape>") 'abort-recursive-edit
(kbd "<return>") 'exit-minibuffer (kbd "<return>") 'exit-minibuffer
(kbd "C-m") 'ivy-done (kbd "C-m") 'ivy-done
"j" 'ivy-next-line "j" 'ivy-next-line
"k" 'ivy-previous-line) "k" 'ivy-previous-line)
(evil-collection-define-key 'insert 'ivy 'ivy-minibuffer-map (evil-collection-define-key 'insert 'ivy-minibuffer-map
[backspace] 'ivy-backward-delete-char [backspace] 'ivy-backward-delete-char
(kbd "C-r") 'ivy-reverse-i-search (kbd "C-r") 'ivy-reverse-i-search
(kbd "C-n") 'ivy-next-line (kbd "C-n") 'ivy-next-line

View File

@ -34,7 +34,7 @@
(defun evil-collection-kotlin-mode-setup () (defun evil-collection-kotlin-mode-setup ()
"Set up `evil' bindings for `kotlin-mode'." "Set up `evil' bindings for `kotlin-mode'."
(evil-collection-define-key 'normal 'kotlin-mode 'kotlin-mode-map (evil-collection-define-key 'normal 'kotlin-mode-map
"gz" 'kotlin-repl)) "gz" 'kotlin-repl))
(provide 'evil-collection-kotlin-mode) (provide 'evil-collection-kotlin-mode)

View File

@ -34,7 +34,7 @@
(defun evil-collection-log-view-setup () (defun evil-collection-log-view-setup ()
"Set up `evil' bindings for `log-view'." "Set up `evil' bindings for `log-view'."
(evil-collection-define-key 'normal 'log-view 'log-view-mode-map (evil-collection-define-key 'normal 'log-view-mode-map
"q" 'quit-window "q" 'quit-window
(kbd "RET") 'log-view-toggle-entry-display (kbd "RET") 'log-view-toggle-entry-display
"m" 'log-view-toggle-mark-entry "m" 'log-view-toggle-mark-entry

View File

@ -35,7 +35,7 @@
(defun evil-collection-lsp-ui-imenu-setup () (defun evil-collection-lsp-ui-imenu-setup ()
"Set up `evil' bindings for `lsp-ui-imenu'." "Set up `evil' bindings for `lsp-ui-imenu'."
(evil-set-initial-state 'lsp-ui-imenu-mode 'normal) (evil-set-initial-state 'lsp-ui-imenu-mode 'normal)
(evil-collection-define-key 'normal 'lsp-ui 'lsp-ui-imenu-mode-map (evil-collection-define-key 'normal 'lsp-ui-imenu-mode-map
(kbd "l") 'lsp-ui-imenu--prev-kind (kbd "l") 'lsp-ui-imenu--prev-kind
(kbd "h") 'lsp-ui-imenu--next-kind (kbd "h") 'lsp-ui-imenu--next-kind
(kbd "q") 'lsp-ui-imenu--kill (kbd "q") 'lsp-ui-imenu--kill

View File

@ -42,7 +42,7 @@
"Set up `evil' bindings for `lua-mode'." "Set up `evil' bindings for `lua-mode'."
(add-hook 'lua-mode-hook #'evil-collection-lua-mode-set-evil-shift-width) (add-hook 'lua-mode-hook #'evil-collection-lua-mode-set-evil-shift-width)
(evil-collection-define-key 'normal 'lua-mode 'lua-mode-map (evil-collection-define-key 'normal 'lua-mode-map
"K" 'lua-search-documentation)) "K" 'lua-search-documentation))
(provide 'evil-collection-lua-mode) (provide 'evil-collection-lua-mode)

View File

@ -38,7 +38,7 @@
;; Force `evil' to normalize keymaps. ;; Force `evil' to normalize keymaps.
(add-hook 'macrostep-mode-hook #'evil-normalize-keymaps) (add-hook 'macrostep-mode-hook #'evil-normalize-keymaps)
(evil-collection-define-key 'normal 'macrostep 'macrostep-keymap (evil-collection-define-key 'normal 'macrostep-keymap
"q" 'macrostep-collapse-all "q" 'macrostep-collapse-all
"e" 'macrostep-expand "e" 'macrostep-expand
"u" 'macrostep-collapse "u" 'macrostep-collapse

View File

@ -40,7 +40,7 @@
(defun evil-collection-magit-setup () (defun evil-collection-magit-setup ()
"Set up `evil' bindings for `magit'." "Set up `evil' bindings for `magit'."
(evil-collection-define-key 'normal 'magit 'magit-blame-mode-map (evil-collection-define-key 'normal 'magit-blame-mode-map
"q" 'magit-blame-quit)) "q" 'magit-blame-quit))
(provide 'evil-collection-magit) (provide 'evil-collection-magit)

View File

@ -35,7 +35,7 @@
(defun evil-collection-man-setup () (defun evil-collection-man-setup ()
"Set up `evil' bindings for `man'." "Set up `evil' bindings for `man'."
(evil-set-initial-state 'Man-mode 'normal) (evil-set-initial-state 'Man-mode 'normal)
(evil-collection-define-key 'normal 'man 'Man-mode-map (evil-collection-define-key 'normal 'Man-mode-map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
(kbd "S-SPC") 'scroll-down-command (kbd "S-SPC") 'scroll-down-command

View File

@ -60,16 +60,16 @@ it does not have a mode."
minibuffer-local-completion-map minibuffer-local-completion-map
minibuffer-local-must-match-map minibuffer-local-must-match-map
minibuffer-local-isearch-map)) minibuffer-local-isearch-map))
(evil-collection-define-key 'normal 'minibuffer map (kbd "<escape>") 'abort-recursive-edit) (evil-collection-define-key 'normal map (kbd "<escape>") 'abort-recursive-edit)
(evil-collection-define-key 'normal 'minibuffer map (kbd "<return>") 'exit-minibuffer)) (evil-collection-define-key 'normal map (kbd "<return>") 'exit-minibuffer))
(add-hook 'minibuffer-setup-hook 'evil-collection-minibuffer-insert) (add-hook 'minibuffer-setup-hook 'evil-collection-minibuffer-insert)
;; Because of the above minibuffer-setup-hook, some evil-ex bindings need be reset. ;; Because of the above minibuffer-setup-hook, some evil-ex bindings need be reset.
(evil-collection-define-key 'normal 'minibuffer evil-ex-completion-map (kbd "<escape>") 'abort-recursive-edit) (evil-collection-define-key 'normal 'evil-ex-completion-map (kbd "<escape>") 'abort-recursive-edit)
(evil-collection-define-key 'insert 'minibuffer evil-ex-completion-map (kbd "C-p") 'previous-complete-history-element) (evil-collection-define-key 'insert 'evil-ex-completion-map (kbd "C-p") 'previous-complete-history-element)
(evil-collection-define-key 'insert 'minibuffer evil-ex-completion-map (kbd "C-n") 'next-complete-history-element) (evil-collection-define-key 'insert 'evil-ex-completion-map (kbd "C-n") 'next-complete-history-element)
(evil-collection-define-key 'normal 'minibuffer evil-ex-completion-map (kbd "C-p") 'previous-history-element) (evil-collection-define-key 'normal 'evil-ex-completion-map (kbd "C-p") 'previous-history-element)
(evil-collection-define-key 'normal 'minibuffer evil-ex-completion-map (kbd "C-n") 'next-history-element)) (evil-collection-define-key 'normal 'evil-ex-completion-map (kbd "C-n") 'next-history-element))
(provide 'evil-collection-minibuffer) (provide 'evil-collection-minibuffer)
;;; evil-collection-minibuffer.el ends here ;;; evil-collection-minibuffer.el ends here

View File

@ -38,7 +38,7 @@
(evil-set-initial-state 'neotree-mode 'normal) ;; Neotree start in normal by default. (evil-set-initial-state 'neotree-mode 'normal) ;; Neotree start in normal by default.
(evil-collection-define-key 'normal 'neotree 'neotree-mode-map (evil-collection-define-key 'normal 'neotree-mode-map
(kbd "<return>") (neotree-make-executor (kbd "<return>") (neotree-make-executor
:file-fn 'neo-open-file :file-fn 'neo-open-file

View File

@ -74,7 +74,7 @@
(evil-set-initial-state 'notmuch-search-mode 'normal) (evil-set-initial-state 'notmuch-search-mode 'normal)
(evil-set-initial-state 'notmuch-hello-mode 'normal) (evil-set-initial-state 'notmuch-hello-mode 'normal)
(evil-collection-define-key 'normal 'notmuch 'notmuch-common-keymap (evil-collection-define-key 'normal 'notmuch-common-keymap
"g?" 'notmuch-help "g?" 'notmuch-help
"q" 'notmuch-bury-or-kill-this-buffer "q" 'notmuch-bury-or-kill-this-buffer
"s" 'notmuch-search "s" 'notmuch-search
@ -85,14 +85,14 @@
"Z" 'notmuch-poll-and-refresh-this-buffer "Z" 'notmuch-poll-and-refresh-this-buffer
"J" 'notmuch-jump-search) "J" 'notmuch-jump-search)
(evil-collection-define-key 'normal 'notmuch 'notmuch-hello-mode-map (evil-collection-define-key 'normal 'notmuch-hello-mode-map
"g?" 'notmuch-hello-versions "g?" 'notmuch-hello-versions
(kbd "TAB") 'widget-forward (kbd "TAB") 'widget-forward
(kbd "RET") 'widget-button-press (kbd "RET") 'widget-button-press
(kbd "S-TAB") 'widget-backward (kbd "S-TAB") 'widget-backward
(kbd "<C-tab>") 'widget-backward) (kbd "<C-tab>") 'widget-backward)
(evil-collection-define-key 'normal 'notmuch 'notmuch-show-mode-map (evil-collection-define-key 'normal 'notmuch-show-mode-map
"gd" 'goto-address-at-point "gd" 'goto-address-at-point
"A" 'notmuch-show-archive-thread-then-next "A" 'notmuch-show-archive-thread-then-next
"S" 'notmuch-show-filter-thread "S" 'notmuch-show-filter-thread
@ -119,7 +119,7 @@
(kbd "RET") 'notmuch-show-toggle-message (kbd "RET") 'notmuch-show-toggle-message
"." 'notmuch-show-part-map) "." 'notmuch-show-part-map)
(evil-collection-define-key 'normal 'notmuch 'notmuch-tree-mode-map (evil-collection-define-key 'normal 'notmuch-tree-mode-map
"g?" (notmuch-tree-close-message-pane-and 'notmuch-help) "g?" (notmuch-tree-close-message-pane-and 'notmuch-help)
"q" 'notmuch-tree-quit "q" 'notmuch-tree-quit
"s" 'notmuch-tree-to-search "s" 'notmuch-tree-to-search
@ -147,7 +147,7 @@
"*" 'notmuch-tree-tag-thread "*" 'notmuch-tree-tag-thread
"e" 'notmuch-tree-resume-message) "e" 'notmuch-tree-resume-message)
(evil-collection-define-key 'normal 'notmuch 'notmuch-search-mode-map (evil-collection-define-key 'normal 'notmuch-search-mode-map
"C" 'compose-mail-other-frame "C" 'compose-mail-other-frame
"J" 'notmuch-jump-search "J" 'notmuch-jump-search
"S" 'notmuch-search-filter "S" 'notmuch-search-filter
@ -167,7 +167,7 @@
"+" 'notmuch-search-add-tag "+" 'notmuch-search-add-tag
(kbd "RET") 'notmuch-search-show-thread) (kbd "RET") 'notmuch-search-show-thread)
(evil-collection-define-key 'normal 'notmuch 'notmuch-search-stash-map (evil-collection-define-key 'normal 'notmuch-search-stash-map
"i" 'notmuch-search-stash-thread-id "i" 'notmuch-search-stash-thread-id
"q" 'notmuch-stash-query "q" 'notmuch-stash-query
"g?" 'notmuch-subkeymap-help)) "g?" 'notmuch-subkeymap-help))

View File

@ -36,7 +36,7 @@
(defun evil-collection-nov-setup () (defun evil-collection-nov-setup ()
"Set up `evil' bindings for `nov'." "Set up `evil' bindings for `nov'."
(evil-collection-define-key 'normal 'nov 'nov-mode-map (evil-collection-define-key 'normal 'nov-mode-map
"gr" 'nov-render-document "gr" 'nov-render-document
"s" 'nov-view-source "s" 'nov-view-source
"S" 'nov-view-content-source "S" 'nov-view-content-source

View File

@ -39,7 +39,7 @@
"Set up `evil' bindings for `occur'." "Set up `evil' bindings for `occur'."
(evil-set-initial-state 'occur-mode 'normal) (evil-set-initial-state 'occur-mode 'normal)
(evil-collection-define-key 'normal 'replace 'occur-mode-map (evil-collection-define-key 'normal 'occur-mode-map
;; Like `wdired-mode'. ;; Like `wdired-mode'.
(kbd "C-x C-q") 'occur-edit-mode (kbd "C-x C-q") 'occur-edit-mode
@ -60,7 +60,7 @@
"c" 'clone-buffer "c" 'clone-buffer
(kbd "C-c C-f") 'next-error-follow-minor-mode) (kbd "C-c C-f") 'next-error-follow-minor-mode)
(evil-collection-define-key 'normal 'replace 'occur-edit-mode-map (evil-collection-define-key 'normal 'occur-edit-mode-map
;; Like `wdired-mode'. ;; Like `wdired-mode'.
(kbd "C-x C-q") 'occur-cease-edit (kbd "C-x C-q") 'occur-cease-edit

View File

@ -46,10 +46,10 @@ mode."
"Set up `evil' bindings for `outline'." "Set up `evil' bindings for `outline'."
(evil-set-initial-state 'outline-mode 'normal) (evil-set-initial-state 'outline-mode 'normal)
(when evil-collection-outline-bind-tab-p (when evil-collection-outline-bind-tab-p
(evil-collection-define-key 'normal 'outline 'outline-mode-map (evil-collection-define-key 'normal 'outline-mode-map
(kbd "<backtab>") 'outline-show-all ; Also "z r" by default (kbd "<backtab>") 'outline-show-all ; Also "z r" by default
(kbd "<tab>") 'outline-toggle-children)) ; Also "z a" by default (kbd "<tab>") 'outline-toggle-children)) ; Also "z a" by default
(evil-collection-define-key 'normal 'outline 'outline-mode-map (evil-collection-define-key 'normal 'outline-mode-map
;; folding ;; folding
;; Evil default keys: ;; Evil default keys:
;; zO: Show recursively for current branch only. ;; zO: Show recursively for current branch only.

View File

@ -37,7 +37,7 @@
"Set up `evil' bindings for `p4'." "Set up `evil' bindings for `p4'."
(evil-set-initial-state 'p4-basic-mode 'normal) (evil-set-initial-state 'p4-basic-mode 'normal)
(evil-collection-define-key 'normal 'p4 p4-basic-mode-map (evil-collection-define-key 'normal 'p4-basic-mode-map
[mouse-1] 'p4-buffer-mouse-clicked [mouse-1] 'p4-buffer-mouse-clicked
"k" 'p4-scroll-down-1-line "k" 'p4-scroll-down-1-line
"j" 'p4-scroll-up-1-line "j" 'p4-scroll-up-1-line

View File

@ -36,7 +36,7 @@
"Set up `evil' bindings for `package-menu'." "Set up `evil' bindings for `package-menu'."
(evil-set-initial-state 'package-menu-mode 'normal) (evil-set-initial-state 'package-menu-mode 'normal)
(evil-collection-define-key 'normal 'package 'package-menu-mode-map (evil-collection-define-key 'normal 'package-menu-mode-map
"i" 'package-menu-mark-install "i" 'package-menu-mark-install
"U" 'package-menu-mark-upgrades "U" 'package-menu-mark-upgrades
"d" 'package-menu-mark-delete "d" 'package-menu-mark-delete

View File

@ -36,7 +36,7 @@
(defun evil-collection-pass-setup () (defun evil-collection-pass-setup ()
"Set up `evil' bindings for `pass-mode'." "Set up `evil' bindings for `pass-mode'."
(evil-collection-define-key 'normal 'pass 'pass-mode-map (evil-collection-define-key 'normal 'pass-mode-map
"gj" 'pass-next-entry "gj" 'pass-next-entry
"gk" 'pass-prev-entry "gk" 'pass-prev-entry
(kbd "C-j") 'pass-next-entry (kbd "C-j") 'pass-next-entry

View File

@ -86,9 +86,9 @@
(defun evil-collection-pdf-setup () (defun evil-collection-pdf-setup ()
"Set up `evil' bindings for `pdf-view'." "Set up `evil' bindings for `pdf-view'."
(evil-collection-util-inhibit-insert-state pdf-view pdf-view-mode-map) (evil-collection-util-inhibit-insert-state pdf-view-mode-map)
(evil-set-initial-state 'pdf-view-mode 'normal) (evil-set-initial-state 'pdf-view-mode 'normal)
(evil-collection-define-key 'normal 'pdf-view 'pdf-view-mode-map (evil-collection-define-key 'normal 'pdf-view-mode-map
;; motion ;; motion
(kbd "<return>") 'image-next-line (kbd "<return>") 'image-next-line
"j" 'evil-collection-pdf-view-next-line-or-next-page "j" 'evil-collection-pdf-view-next-line-or-next-page
@ -177,9 +177,9 @@
"ZQ" 'kill-this-buffer "ZQ" 'kill-this-buffer
"ZZ" 'quit-window) "ZZ" 'quit-window)
(evil-collection-util-inhibit-insert-state pdf-outline pdf-outline-buffer-mode-map) (evil-collection-util-inhibit-insert-state pdf-outline-buffer-mode-map)
(evil-set-initial-state 'pdf-outline-buffer-mode 'normal) (evil-set-initial-state 'pdf-outline-buffer-mode 'normal)
(evil-collection-define-key 'normal 'pdf-outline 'pdf-outline-buffer-mode-map (evil-collection-define-key 'normal 'pdf-outline-buffer-mode-map
;; open ;; open
(kbd "<return>") 'pdf-outline-follow-link-and-quit (kbd "<return>") 'pdf-outline-follow-link-and-quit
(kbd "S-<return>") 'pdf-outline-follow-link (kbd "S-<return>") 'pdf-outline-follow-link
@ -200,9 +200,9 @@
"ZQ" 'quit-window "ZQ" 'quit-window
"ZZ" 'pdf-outline-quit-and-kill) "ZZ" 'pdf-outline-quit-and-kill)
(evil-collection-util-inhibit-insert-state pdf-occur pdf-occur-buffer-mode-map) (evil-collection-util-inhibit-insert-state pdf-occur-buffer-mode-map)
(evil-set-initial-state 'pdf-occur-buffer-mode 'normal) (evil-set-initial-state 'pdf-occur-buffer-mode 'normal)
(evil-collection-define-key 'normal 'pdf-occur 'pdf-occur-buffer-mode-map (evil-collection-define-key 'normal 'pdf-occur-buffer-mode-map
;; open ;; open
(kbd "<return>") 'pdf-occur-goto-occurrence (kbd "<return>") 'pdf-occur-goto-occurrence
(kbd "S-<return>") 'pdf-occur-view-occurrence (kbd "S-<return>") 'pdf-occur-view-occurrence

View File

@ -34,9 +34,9 @@
(defun evil-collection-proced-setup () (defun evil-collection-proced-setup ()
"Set up `evil' bindings for `proced'." "Set up `evil' bindings for `proced'."
(evil-collection-util-inhibit-insert-state proced proced-mode-map) (evil-collection-util-inhibit-insert-state proced-mode-map)
(evil-set-initial-state 'proced-mode 'normal) (evil-set-initial-state 'proced-mode 'normal)
(evil-collection-define-key 'normal 'proced 'proced-mode-map (evil-collection-define-key 'normal 'proced-mode-map
(kbd "<return>") 'proced-refine (kbd "<return>") 'proced-refine
;; mark ;; mark

View File

@ -35,7 +35,7 @@
(defun evil-collection-prodigy-setup () (defun evil-collection-prodigy-setup ()
"Set up `evil' bindings for `prodigy'." "Set up `evil' bindings for `prodigy'."
(evil-collection-define-key 'normal 'prodigy 'prodigy-mode-map (evil-collection-define-key 'normal 'prodigy-mode-map
;; quit ;; quit
"q" 'quit-window "q" 'quit-window
@ -72,7 +72,7 @@
(kbd "C-k") 'prodigy-prev-with-status (kbd "C-k") 'prodigy-prev-with-status
(kbd "Y") 'prodigy-copy-cmd) (kbd "Y") 'prodigy-copy-cmd)
(evil-collection-define-key 'normal 'prodigy 'prodigy-view-mode-map (evil-collection-define-key 'normal 'prodigy-view-mode-map
"x" 'prodigy-view-clear-buffer)) "x" 'prodigy-view-clear-buffer))
(provide 'evil-collection-prodigy) (provide 'evil-collection-prodigy)

View File

@ -36,7 +36,7 @@
"Set up `evil' bindings for `profiler'." "Set up `evil' bindings for `profiler'."
(evil-set-initial-state 'profiler-report-mode 'normal) (evil-set-initial-state 'profiler-report-mode 'normal)
(evil-collection-define-key 'normal 'profiler 'profiler-report-mode-map (evil-collection-define-key 'normal 'profiler-report-mode-map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
(kbd "S-SPC") 'scroll-down-command (kbd "S-SPC") 'scroll-down-command

View File

@ -40,7 +40,7 @@
"Set up `evil' bindings for `python'." "Set up `evil' bindings for `python'."
(add-hook 'python-mode-hook #'evil-collection-python-set-evil-shift-width) (add-hook 'python-mode-hook #'evil-collection-python-set-evil-shift-width)
(evil-collection-define-key 'normal 'python 'python-mode-map (evil-collection-define-key 'normal 'python-mode-map
"gz" 'python-shell-switch-to-shell)) "gz" 'python-shell-switch-to-shell))
(provide 'evil-collection-python) (provide 'evil-collection-python)

View File

@ -34,7 +34,7 @@
(defun evil-collection-quickrun-setup () (defun evil-collection-quickrun-setup ()
"Set up `evil' bindings for `quickrun'.." "Set up `evil' bindings for `quickrun'.."
(evil-collection-define-key 'normal 'quickrun 'quickrun--mode-map (evil-collection-define-key 'normal 'quickrun--mode-map
"q" 'quit-window)) "q" 'quit-window))
(provide 'evil-collection-quickrun) (provide 'evil-collection-quickrun)

View File

@ -35,12 +35,12 @@
(defun evil-collection-racer-setup () (defun evil-collection-racer-setup ()
"Set up `evil' bindings for `racer'." "Set up `evil' bindings for `racer'."
(evil-collection-define-key 'normal 'racer 'racer-mode-map (evil-collection-define-key 'normal 'racer-mode-map
"gd" 'racer-find-definition "gd" 'racer-find-definition
(kbd "C-t") 'pop-tag-mark (kbd "C-t") 'pop-tag-mark
"K" 'racer-describe) "K" 'racer-describe)
(evil-collection-define-key 'normal 'racer 'racer-help-mode-map (evil-collection-define-key 'normal 'racer-help-mode-map
"q" 'quit-window)) "q" 'quit-window))
(provide 'evil-collection-racer) (provide 'evil-collection-racer)

View File

@ -35,7 +35,7 @@
(defun evil-collection-realgud-setup () (defun evil-collection-realgud-setup ()
"Set up `evil' bindings for `realgud'." "Set up `evil' bindings for `realgud'."
;; This one is to represent `realgud-populate-src-buffer-map-plain'. ;; This one is to represent `realgud-populate-src-buffer-map-plain'.
(evil-collection-define-key 'normal 'realgud 'realgud:shortkey-mode-map (evil-collection-define-key 'normal 'realgud:shortkey-mode-map
"b" 'realgud:cmd-break "b" 'realgud:cmd-break
"u" 'realgud:cmd-delete "u" 'realgud:cmd-delete
"X" 'realgud:cmd-clear "X" 'realgud:cmd-clear
@ -63,7 +63,7 @@
;; (define-key map [M-S-up] 'realgud-track-hist-oldest) ;; (define-key map [M-S-up] 'realgud-track-hist-oldest)
) )
(evil-collection-define-key 'normal 'realgud 'realgud:shortkey-mode-map (evil-collection-define-key 'normal 'realgud:shortkey-mode-map
(kbd "C-x C-q") 'realgud-short-key-mode (kbd "C-x C-q") 'realgud-short-key-mode
"1" 'realgud-goto-arrow1 "1" 'realgud-goto-arrow1
"2" 'realgud-goto-arrow2 "2" 'realgud-goto-arrow2

View File

@ -76,7 +76,7 @@
(evil-set-initial-state 'reftex-select-label-mode 'normal) (evil-set-initial-state 'reftex-select-label-mode 'normal)
(evil-set-initial-state 'reftex-select-bib-mode 'normal) (evil-set-initial-state 'reftex-select-bib-mode 'normal)
(evil-collection-define-key 'normal 'reftex 'reftex-select-shared-map (evil-collection-define-key 'normal 'reftex-select-shared-map
"j" 'reftex-select-next "j" 'reftex-select-next
"k" 'reftex-select-previous "k" 'reftex-select-previous
(kbd "]") 'reftex-select-next-heading (kbd "]") 'reftex-select-next-heading
@ -120,7 +120,7 @@
;; This one is more involved, in reftex-toc.el, line 282 it shows the prompt ;; This one is more involved, in reftex-toc.el, line 282 it shows the prompt
;; string with the keybinds and I don't see any way of changing it to show evil-like binds. ;; string with the keybinds and I don't see any way of changing it to show evil-like binds.
(evil-collection-define-key 'normal 'reftex 'reftex-toc-mode-map (evil-collection-define-key 'normal 'reftex-toc-mode-map
"j" 'reftex-toc-next "j" 'reftex-toc-next
"k" 'reftex-toc-previous "k" 'reftex-toc-previous
(kbd "RET") 'reftex-toc-goto-line-and-hide (kbd "RET") 'reftex-toc-goto-line-and-hide

View File

@ -37,9 +37,9 @@
(defun evil-collection-rjsx-mode-setup () (defun evil-collection-rjsx-mode-setup ()
"Set up `evil' bindings for `rjsx-mode'." "Set up `evil' bindings for `rjsx-mode'."
(when evil-want-C-d-scroll (when evil-want-C-d-scroll
(evil-collection-define-key 'insert 'rjsx-mode 'rjsx-mode-map (evil-collection-define-key 'insert 'rjsx-mode-map
(kbd "C-d") 'rjsx-delete-creates-full-tag) (kbd "C-d") 'rjsx-delete-creates-full-tag)
(evil-collection-define-key 'normal 'rjsx-mode 'rjsx-mode-map (evil-collection-define-key 'normal 'rjsx-mode-map
(kbd "C-d") 'evil-scroll-down))) (kbd "C-d") 'evil-scroll-down)))
(provide 'evil-collection-rjsx-mode) (provide 'evil-collection-rjsx-mode)

View File

@ -34,7 +34,7 @@
(defun evil-collection-robe-setup () (defun evil-collection-robe-setup ()
"Set up `evil' bindings for `robe'." "Set up `evil' bindings for `robe'."
(evil-collection-define-key 'normal 'robe 'robe-mode-map (evil-collection-define-key 'normal 'robe-mode-map
"gd" 'robe-jump "gd" 'robe-jump
(kbd "C-t") 'pop-tag-mark (kbd "C-t") 'pop-tag-mark
"K" 'robe-doc "K" 'robe-doc

View File

@ -47,7 +47,7 @@
(evil-set-initial-state 'rtags-references-tree-mode 'normal) (evil-set-initial-state 'rtags-references-tree-mode 'normal)
(evil-set-initial-state 'rtags-location-stack-visualize-mode 'normal) (evil-set-initial-state 'rtags-location-stack-visualize-mode 'normal)
(evil-collection-define-key 'normal 'rtags 'rtags-mode-map (evil-collection-define-key 'normal 'rtags-mode-map
;; open ;; open
(kbd "<return>") 'rtags-select (kbd "<return>") 'rtags-select
(kbd "S-<return>") 'rtags-select-other-window (kbd "S-<return>") 'rtags-select-other-window
@ -62,7 +62,7 @@
"x" 'rtags-select-and-remove-rtags-buffer "x" 'rtags-select-and-remove-rtags-buffer
"q" 'rtags-call-bury-or-delete) "q" 'rtags-call-bury-or-delete)
(evil-collection-define-key 'normal 'rtags 'rtags-dependency-tree-mode-map (evil-collection-define-key 'normal 'rtags-dependency-tree-mode-map
(kbd "<tab>") 'rtags-dependency-tree-toggle-current-expanded (kbd "<tab>") 'rtags-dependency-tree-toggle-current-expanded
"E" 'rtags-dependency-tree-expand-all "E" 'rtags-dependency-tree-expand-all
"c" 'rtags-dependency-tree-collapse-all "c" 'rtags-dependency-tree-collapse-all
@ -92,7 +92,7 @@
"x" 'rtags-select-and-remove-rtags-buffer "x" 'rtags-select-and-remove-rtags-buffer
"q" 'rtags-call-bury-or-delete) "q" 'rtags-call-bury-or-delete)
(evil-collection-define-key 'normal 'rtags 'rtags-references-tree-mode-map (evil-collection-define-key 'normal 'rtags-references-tree-mode-map
(kbd "<tab>") 'rtags-references-tree-toggle-current-expanded (kbd "<tab>") 'rtags-references-tree-toggle-current-expanded
"E" 'rtags-references-tree-expand-all "E" 'rtags-references-tree-expand-all
@ -122,7 +122,7 @@
"x" 'rtags-select-and-remove-rtags-buffer "x" 'rtags-select-and-remove-rtags-buffer
"q" 'rtags-call-bury-or-delete) "q" 'rtags-call-bury-or-delete)
(evil-collection-define-key 'normal 'rtags 'rtags-location-stack-visualize-mode-map (evil-collection-define-key 'normal 'rtags-location-stack-visualize-mode-map
;; open ;; open
(kbd "<return>") 'rtags-select (kbd "<return>") 'rtags-select
(kbd "S-<return>") 'rtags-select-other-window (kbd "S-<return>") 'rtags-select-other-window

View File

@ -36,7 +36,7 @@
(defun evil-collection-simple-setup () (defun evil-collection-simple-setup ()
"Set up `evil' bindings for `simple'." "Set up `evil' bindings for `simple'."
(evil-collection-define-key '(normal visual) 'simple 'special-mode-map (evil-collection-define-key '(normal visual) 'special-mode-map
"q" 'quit-window "q" 'quit-window
" " 'scroll-up-command " " 'scroll-up-command
"g?" 'describe-mode "g?" 'describe-mode

View File

@ -67,11 +67,11 @@
(evil-set-initial-state 'slime-popup-buffer-mode 'normal) (evil-set-initial-state 'slime-popup-buffer-mode 'normal)
(evil-set-initial-state 'slime-xref-mode 'normal) (evil-set-initial-state 'slime-xref-mode 'normal)
(evil-collection-define-key 'normal 'slime 'slime-parent-map (evil-collection-define-key 'normal 'slime-parent-map
"gd" 'slime-edit-definition "gd" 'slime-edit-definition
(kbd "C-t") 'slime-pop-find-definition-stack) (kbd "C-t") 'slime-pop-find-definition-stack)
(evil-collection-define-key 'normal 'slime 'sldb-mode-map (evil-collection-define-key 'normal 'sldb-mode-map
(kbd "RET") 'sldb-default-action (kbd "RET") 'sldb-default-action
(kbd "C-m") 'sldb-default-action (kbd "C-m") 'sldb-default-action
[return] 'sldb-default-action [return] 'sldb-default-action
@ -121,7 +121,7 @@
"8" 'sldb-invoke-restart-8 "8" 'sldb-invoke-restart-8
"9" 'sldb-invoke-restart-9) "9" 'sldb-invoke-restart-9)
(evil-collection-define-key 'normal 'slime 'slime-inspector-mode-map (evil-collection-define-key 'normal 'slime-inspector-mode-map
[return] 'slime-inspector-operate-on-point [return] 'slime-inspector-operate-on-point
(kbd "C-m") 'slime-inspector-operate-on-point (kbd "C-m") 'slime-inspector-operate-on-point
[mouse-1] 'slime-inspector-operate-on-click [mouse-1] 'slime-inspector-operate-on-click
@ -147,13 +147,13 @@
"gR" 'slime-inspector-fetch-all "gR" 'slime-inspector-fetch-all
"q" 'slime-inspector-quit) "q" 'slime-inspector-quit)
(evil-collection-define-key 'normal 'slime 'slime-mode-map (evil-collection-define-key 'normal 'slime-mode-map
(kbd "K") 'slime-describe-symbol (kbd "K") 'slime-describe-symbol
(kbd "C-t") 'slime-pop-find-definition-stack (kbd "C-t") 'slime-pop-find-definition-stack
;; goto ;; goto
"gd" 'slime-edit-definition) "gd" 'slime-edit-definition)
(evil-collection-define-key 'normal 'slime 'slime-popup-buffer-mode-map (evil-collection-define-key 'normal 'slime-popup-buffer-mode-map
;; quit ;; quit
"q" 'quit-window "q" 'quit-window
@ -162,7 +162,7 @@
;; goto ;; goto
"gd" 'slime-edit-definition) "gd" 'slime-edit-definition)
(evil-collection-define-key 'normal 'slime 'slime-xref-mode-map (evil-collection-define-key 'normal 'slime-xref-mode-map
(kbd "RET") 'slime-goto-xref (kbd "RET") 'slime-goto-xref
(kbd "S-<return>") 'slime-goto-xref (kbd "S-<return>") 'slime-goto-xref
"go" 'slime-show-xref "go" 'slime-show-xref

View File

@ -114,7 +114,7 @@ it is not appropriate in some cases like terminals."
;; Evil has some "C-" bindings in insert state that shadow regular terminal bindings. ;; Evil has some "C-" bindings in insert state that shadow regular terminal bindings.
;; Don't raw-send "C-c" (prefix key) nor "C-h" (help prefix). ;; Don't raw-send "C-c" (prefix key) nor "C-h" (help prefix).
(evil-collection-define-key 'insert 'term 'term-raw-map (evil-collection-define-key 'insert 'term-raw-map
(kbd "C-a") 'term-send-raw (kbd "C-a") 'term-send-raw
(kbd "C-b") 'term-send-raw ; Should not be necessary. (kbd "C-b") 'term-send-raw ; Should not be necessary.
(kbd "C-d") 'term-send-raw (kbd "C-d") 'term-send-raw
@ -138,7 +138,7 @@ it is not appropriate in some cases like terminals."
(kbd "C-c C-d") 'term-send-eof (kbd "C-c C-d") 'term-send-eof
(kbd "C-c C-z") 'term-stop-subjob) (kbd "C-c C-z") 'term-stop-subjob)
(evil-collection-define-key 'normal 'term 'term-mode-map (evil-collection-define-key 'normal 'term-mode-map
(kbd "C-c C-k") 'evil-collection-term-char-mode-insert (kbd "C-c C-k") 'evil-collection-term-char-mode-insert
(kbd "<return>") 'term-send-input (kbd "<return>") 'term-send-input

View File

@ -36,12 +36,12 @@
(defun evil-collection-tide-setup () (defun evil-collection-tide-setup ()
"Set up `evil' bindings for `tide'." "Set up `evil' bindings for `tide'."
(evil-collection-define-key 'normal 'tide 'tide-mode-map (evil-collection-define-key 'normal 'tide-mode-map
"gd" 'tide-jump-to-definition "gd" 'tide-jump-to-definition
(kbd "C-t") 'tide-jump-back (kbd "C-t") 'tide-jump-back
"K" 'tide-documentation-at-point) "K" 'tide-documentation-at-point)
(evil-collection-define-key 'normal 'tide 'tide-references-mode-map (evil-collection-define-key 'normal 'tide-references-mode-map
"gj" 'tide-find-next-reference "gj" 'tide-find-next-reference
"gk" 'tide-find-previous-reference "gk" 'tide-find-previous-reference
(kbd "C-j") 'tide-find-next-reference (kbd "C-j") 'tide-find-next-reference
@ -51,7 +51,7 @@
;; quit ;; quit
"q" 'quit-window) "q" 'quit-window)
(evil-collection-define-key 'normal 'tide 'tide-project-errors-mode-map (evil-collection-define-key 'normal 'tide-project-errors-mode-map
"gj" 'tide-find-next-error "gj" 'tide-find-next-error
"gk" 'tide-find-previous-error "gk" 'tide-find-previous-error
(kbd "C-j") 'tide-find-next-error (kbd "C-j") 'tide-find-next-error

View File

@ -44,9 +44,9 @@
(defun evil-collection-transmission-setup () (defun evil-collection-transmission-setup ()
"Set up `evil' bindings for `transmission'." "Set up `evil' bindings for `transmission'."
(evil-collection-util-inhibit-insert-state transmission transmission-mode-map) (evil-collection-util-inhibit-insert-state transmission-mode-map)
(evil-set-initial-state 'transmission-mode 'normal) (evil-set-initial-state 'transmission-mode 'normal)
(evil-collection-define-key 'normal 'transmission 'transmission-mode-map (evil-collection-define-key 'normal 'transmission-mode-map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
(kbd "S-SPC") 'scroll-down-command (kbd "S-SPC") 'scroll-down-command
@ -84,9 +84,9 @@
"ZQ" 'evil-quit "ZQ" 'evil-quit
"ZZ" 'transmission-quit) "ZZ" 'transmission-quit)
(evil-collection-util-inhibit-insert-state transmission transmission-files-mode-map) (evil-collection-util-inhibit-insert-state transmission-files-mode-map)
(evil-set-initial-state 'transmission-files-mode 'normal) (evil-set-initial-state 'transmission-files-mode 'normal)
(evil-collection-define-key 'normal 'transmission 'transmission-files-mode-map (evil-collection-define-key 'normal 'transmission-files-mode-map
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
(kbd "S-SPC") 'scroll-down-command (kbd "S-SPC") 'scroll-down-command
(kbd "<delete>") 'scroll-down-command (kbd "<delete>") 'scroll-down-command
@ -125,9 +125,9 @@
"ZQ" 'evil-quit "ZQ" 'evil-quit
"ZZ" 'transmission-quit) "ZZ" 'transmission-quit)
(evil-collection-util-inhibit-insert-state transmission transmission-info-mode-map) (evil-collection-util-inhibit-insert-state transmission-info-mode-map)
(evil-set-initial-state 'transmission-info-mode 'normal) (evil-set-initial-state 'transmission-info-mode 'normal)
(evil-collection-define-key 'normal 'transmission 'transmission-info-mode-map (evil-collection-define-key 'normal 'transmission-info-mode-map
"p" 'transmission-peers "p" 'transmission-peers
"t" 'transmission-trackers-add "t" 'transmission-trackers-add
@ -143,7 +143,7 @@
"ZQ" 'evil-quit "ZQ" 'evil-quit
"ZZ" 'quit-window) "ZZ" 'quit-window)
(evil-collection-define-key 'operator 'transmission 'transmission-info-mode-map (evil-collection-define-key 'operator 'transmission-info-mode-map
;; Like `eww'. ;; Like `eww'.
"u" '(menu-item "u" '(menu-item
"" ""
@ -155,9 +155,9 @@
#'transmission-copy-magnet)))) #'transmission-copy-magnet))))
(evil-collection-util-inhibit-insert-state transmission transmission-peers-mode-map) (evil-collection-util-inhibit-insert-state transmission-peers-mode-map)
(evil-set-initial-state 'transmission-peers-mode 'normal) (evil-set-initial-state 'transmission-peers-mode 'normal)
(evil-collection-define-key 'normal 'transmission 'transmission-peers-mode-map (evil-collection-define-key 'normal 'transmission-peers-mode-map
;; sort ;; sort
"o" 'tabulated-list-sort "o" 'tabulated-list-sort

View File

@ -29,11 +29,11 @@
;;; Code: ;;; Code:
(require 'evil) (require 'evil)
(defmacro evil-collection-util-inhibit-insert-state (package map) (defmacro evil-collection-util-inhibit-insert-state (map)
"Unmap insertion keys from normal state. "Unmap insertion keys from normal state.
This is particularly useful for read-only modes." This is particularly useful for read-only modes."
`(evil-collection-define-key `(evil-collection-define-key
'normal ',package ',map 'normal ',map
[remap evil-append] #'ignore [remap evil-append] #'ignore
[remap evil-append-line] #'ignore [remap evil-append-line] #'ignore
[remap evil-insert] #'ignore [remap evil-insert] #'ignore

View File

@ -35,7 +35,7 @@
(defun evil-collection-vc-annotate-setup () (defun evil-collection-vc-annotate-setup ()
"Set up `evil' bindings for `vc-annotate'." "Set up `evil' bindings for `vc-annotate'."
(evil-set-initial-state 'vc-annotate-mode 'normal) (evil-set-initial-state 'vc-annotate-mode 'normal)
(evil-collection-define-key 'normal 'vc-annotate 'vc-annotate-mode-map (evil-collection-define-key 'normal 'vc-annotate-mode-map
"q" 'quit-window "q" 'quit-window
"a" 'vc-annotate-revision-previous-to-line "a" 'vc-annotate-revision-previous-to-line
"d" 'vc-annotate-show-diff-revision-at-line "d" 'vc-annotate-show-diff-revision-at-line

View File

@ -35,7 +35,7 @@
(defun evil-collection-view-setup () (defun evil-collection-view-setup ()
"Set up `evil' bindings for `view'." "Set up `evil' bindings for `view'."
(evil-set-initial-state 'view-mode 'normal) (evil-set-initial-state 'view-mode 'normal)
(evil-collection-define-key 'normal 'view 'view-mode-map (evil-collection-define-key 'normal 'view-mode-map
"q" 'quit-window "q" 'quit-window
(kbd "SPC") 'View-scroll-page-forward (kbd "SPC") 'View-scroll-page-forward
(kbd "S-SPC") 'View-scroll-page-backward (kbd "S-SPC") 'View-scroll-page-backward

View File

@ -45,7 +45,7 @@
"Set up `evil' bindings for `vlf'." "Set up `evil' bindings for `vlf'."
(evil-set-initial-state 'vlf-mode 'normal) (evil-set-initial-state 'vlf-mode 'normal)
(evil-collection-define-key 'normal 'vlf 'vlf-mode-map (evil-collection-define-key 'normal 'vlf-mode-map
"gj" 'vlf-next-batch "gj" 'vlf-next-batch
"gk" 'vlf-prev-batch "gk" 'vlf-prev-batch
(kbd "C-j") 'vlf-next-batch (kbd "C-j") 'vlf-next-batch

View File

@ -34,10 +34,10 @@
(defun evil-collection-wdired-setup () (defun evil-collection-wdired-setup ()
"Set up `evil' bindings for `wdired'." "Set up `evil' bindings for `wdired'."
(evil-collection-define-key nil 'wdired wdired-mode-map (evil-collection-define-key nil 'wdired-mode-map
[remap evil-write] 'wdired-finish-edit) [remap evil-write] 'wdired-finish-edit)
(evil-collection-define-key 'normal 'wdired wdired-mode-map (evil-collection-define-key 'normal 'wdired-mode-map
"ZQ" 'wdired-abort-changes "ZQ" 'wdired-abort-changes
"ZZ" 'wdired-finish-edit "ZZ" 'wdired-finish-edit
(kbd "<escape>") 'wdired-exit)) (kbd "<escape>") 'wdired-exit))

View File

@ -36,10 +36,10 @@
(defun evil-collection-wgrep-setup () (defun evil-collection-wgrep-setup ()
"Set up `evil' bindings for `wgrep'." "Set up `evil' bindings for `wgrep'."
(evil-collection-define-key nil 'wgrep wgrep-mode-map (evil-collection-define-key nil 'wgrep-mode-map
[remap evil-write] 'wgrep-finish-edit) [remap evil-write] 'wgrep-finish-edit)
(evil-collection-define-key 'normal 'wgrep wgrep-mode-map (evil-collection-define-key 'normal 'wgrep-mode-map
"ZQ" 'wgrep-abort-changes "ZQ" 'wgrep-abort-changes
"ZZ" 'wgrep-finish-edit "ZZ" 'wgrep-finish-edit
(kbd "<escape>") 'wgrep-exit)) (kbd "<escape>") 'wgrep-exit))

View File

@ -36,7 +36,7 @@
(defun evil-collection-woman-setup () (defun evil-collection-woman-setup ()
"Set up `evil' bindings for `woman'." "Set up `evil' bindings for `woman'."
(evil-set-initial-state 'woman-mode 'normal) (evil-set-initial-state 'woman-mode 'normal)
(evil-collection-define-key 'normal 'woman 'woman-mode-map (evil-collection-define-key 'normal 'woman-mode-map
(kbd "]") 'WoMan-next-manpage (kbd "]") 'WoMan-next-manpage
(kbd "[") 'WoMan-previous-manpage (kbd "[") 'WoMan-previous-manpage

View File

@ -34,7 +34,7 @@
(defun evil-collection-xref-setup () (defun evil-collection-xref-setup ()
"Set up `evil' bindings for `xref'." "Set up `evil' bindings for `xref'."
(evil-collection-define-key 'normal 'xref 'xref--xref-buffer-mode-map (evil-collection-define-key 'normal 'xref--xref-buffer-mode-map
"q" 'quit-window "q" 'quit-window
"gj" 'xref-next-line "gj" 'xref-next-line
"gk" 'xref-prev-line "gk" 'xref-prev-line

View File

@ -37,9 +37,9 @@
(defun evil-collection-ztree-setup () (defun evil-collection-ztree-setup ()
"Set up `evil' bindings for `ztree'." "Set up `evil' bindings for `ztree'."
(evil-collection-util-inhibit-insert-state ztree ztree-mode-map) (evil-collection-util-inhibit-insert-state ztree-mode-map)
(evil-set-initial-state 'ztree-mode 'normal) (evil-set-initial-state 'ztree-mode 'normal)
(evil-collection-define-key 'normal 'ztree 'ztree-mode-map (evil-collection-define-key 'normal 'ztree-mode-map
(kbd "<tab>") 'ztree-jump-side (kbd "<tab>") 'ztree-jump-side
(kbd "<return>") 'ztree-perform-action (kbd "<return>") 'ztree-perform-action
(kbd "SPC") 'ztree-perform-soft-action (kbd "SPC") 'ztree-perform-soft-action
@ -54,7 +54,7 @@
"ZQ" 'quit-window "ZQ" 'quit-window
"ZZ" 'quit-window) "ZZ" 'quit-window)
(evil-collection-util-inhibit-insert-state ztree ztreediff-mode-map) (evil-collection-util-inhibit-insert-state ztreediff-mode-map)
(evil-set-initial-state 'ztree-mode 'normal) (evil-set-initial-state 'ztree-mode 'normal)
(evil-define-minor-mode-key 'normal 'ztreediff-mode (evil-define-minor-mode-key 'normal 'ztreediff-mode
"C" 'ztree-diff-copy "C" 'ztree-diff-copy

View File

@ -181,9 +181,10 @@ This is a list of strings that are suitable for input to `kbd'."
(defvar evil-collection--bindings-record (make-hash-table :test 'eq) (defvar evil-collection--bindings-record (make-hash-table :test 'eq)
"Record of bindings currently made by Evil Collection. This is "Record of bindings currently made by Evil Collection. This is
a hash-table with the package symbol as a key. The associated a hash-table with the package symbol as a key. The associated
values are the package's bindings which are stored as a hash-table with key values are the package's bindings which are stored as a
being the key to be bound and value as the binding.") hash-table with key being the key to be bound and value as the
binding.")
(defvar evil-collection-setup-hook nil (defvar evil-collection-setup-hook nil
"Hook run by `evil-collection-init' for each mode that is evilified. "Hook run by `evil-collection-init' for each mode that is evilified.
@ -197,7 +198,7 @@ compatibility.")
(defvar evil-collection-describe-buffer "*evil-collection*" (defvar evil-collection-describe-buffer "*evil-collection*"
"Name for Evil Collection buffer used to describe bindings.") "Name for Evil Collection buffer used to describe bindings.")
(defun evil-collection-define-key (state package map-sym &rest bindings) (defun evil-collection-define-key (state map-sym &rest bindings)
"Wrapper for `evil-define-key*' with additional features. "Wrapper for `evil-define-key*' with additional features.
Filter keys on the basis of `evil-collection-key-whitelist' and Filter keys on the basis of `evil-collection-key-whitelist' and
`evil-collection-key-blacklist'. Store bindings in `evil-collection-key-blacklist'. Store bindings in
@ -205,21 +206,33 @@ Filter keys on the basis of `evil-collection-key-whitelist' and
(declare (indent defun)) (declare (indent defun))
(let* ((whitelist (mapcar 'kbd evil-collection-key-whitelist)) (let* ((whitelist (mapcar 'kbd evil-collection-key-whitelist))
(blacklist (mapcar 'kbd evil-collection-key-blacklist)) (blacklist (mapcar 'kbd evil-collection-key-blacklist))
(record (gethash package evil-collection--bindings-record (record (gethash map-sym evil-collection--bindings-record
(make-hash-table :test 'equal)))) (make-hash-table :test 'equal)))
filtered-bindings)
(while bindings (while bindings
(let ((key (pop bindings)) (let ((key (pop bindings))
(def (pop bindings))) (def (pop bindings)))
(when (or (and whitelist (member key whitelist)) (when (or (and whitelist (member key whitelist))
(not (member key blacklist))) (not (member key blacklist)))
(puthash key def record) (puthash key def record)
(eval-after-load package (push key filtered-bindings)
`(condition-case err (push def filtered-bindings))))
(evil-define-key* ',state ,map-sym ,key ',def) (setq filtered-bindings (nreverse filtered-bindings))
(error (cond ((and (boundp map-sym) (keymapp (symbol-value map-sym)))
(message "evil-collection: Bad binding %s" (apply #'evil-define-key*
'(evil-define-key* ',state ,map-sym ,key ',def)))))))) state (symbol-value map-sym) filtered-bindings))
(puthash package record evil-collection--bindings-record))) ((boundp map-sym)
(user-error "evil-collection: %s is not a keymap" map-sym))
(t
(let* ((fname (format "evil-collection-define-key-in-%s" map-sym))
(fun (make-symbol fname)))
(fset fun `(lambda (&rest args)
(when (and (boundp ',map-sym) (keymapp ,map-sym))
(remove-hook 'after-load-functions #',fun)
(apply #'evil-define-key*
',state ,map-sym ',filtered-bindings))))
(add-hook 'after-load-functions fun t))))
(puthash map-sym record evil-collection--bindings-record)))
(defun evil-collection-describe-all-bindings () (defun evil-collection-describe-all-bindings ()
"Print bindings made by Evil Collection to separate buffer." "Print bindings made by Evil Collection to separate buffer."