Emacs: Evil: Finalize Info and help-mode bindings

master
Pierre Neidhardt 2017-07-24 16:15:57 +01:00
parent e6a2f02fb9
commit 8626516916
3 changed files with 40 additions and 15 deletions

View File

@ -0,0 +1,11 @@
;;; Evil+help-mode
(evil-define-key 'motion help-mode-map
(kbd "S-SPC") 'scroll-up-command ; Custom
"\C-f" 'scroll-up-command
"\C-b" 'scroll-down-command
(kbd "TAB") 'forward-button
(kbd "<backtab>") 'backward-button
"\C-o" 'help-go-back)
(provide 'init-evil-help)

View File

@ -0,0 +1,27 @@
;;; Evil+Info
(evil-define-key 'motion Info-mode-map
(kbd "C-SPC") 'Info-scroll-up ; Custom
"\C-j" 'Info-next
"\C-k" 'Info-prev
"\M-j" 'Info-next ; Custom
"\M-k" 'Info-prev ; Custom
"\M-sf" 'Info-goto-node
"w" 'evil-forward-word-begin
"e" 'evil-forward-word-end
"ge" 'evil-backward-word-end
"gE" 'evil-backward-WORD-end
"b" 'evil-backward-word-begin
"\M-w" 'Info-copy-current-node-name
"gg" 'evil-goto-first-line
"gt" 'Info-top-node
"gT" 'Info-toc
"gf" 'Info-follow-reference
"t" 'evil-find-char-to
"T" 'evil-find-char-to-backward
"f" 'evil-find-char
"n" 'evil-search-next
"?" 'evil-search-backward
"p" nil)
(provide 'init-evil-info)

View File

@ -181,21 +181,8 @@ See `eshell' for the numeric prefix ARG."
;; Motion map: useful for `Info-mode', `help-mode', etc.
;; See `evil-motion-state-modes'.
(evil-global-set-key 'motion (kbd "TAB") 'forward-button)
(evil-global-set-key 'motion (kbd "<backtab>") 'backward-button)
(evil-define-key 'motion Info-mode-map
(kbd "S-SPC") 'Info-scroll-up
"\C-f" 'Info-scroll-up
"\C-b" 'Info-scroll-down
"\M-sf" 'Info-goto-node
"gg" 'evil-goto-first-line)
(evil-define-key 'motion help-mode-map
(kbd "S-SPC") 'scroll-up-command
"\C-f" 'scroll-up-command
"\C-b" 'scroll-down-command
"\C-o" 'help-go-back)
(require 'init-evil-info)
(require 'init-evil-help)
(with-eval-after-load 'transmission (require 'init-evil-transmission))