Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up Info-mode #501

Merged
merged 4 commits into from
Sep 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 3 additions & 35 deletions modes/info/evil-collection-info.el
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
(evil-collection-set-readonly-bindings 'Info-mode-map)
(evil-set-initial-state 'Info-mode 'normal)
(evil-collection-define-key 'normal 'Info-mode-map
"l" 'evil-forward-char
"h" 'evil-backward-char
(kbd "<tab>") 'Info-next-reference
(kbd "S-<tab>") 'Info-prev-reference
;; This exists because <tab> is recognized as C-i on terminals.
Expand All @@ -49,7 +47,6 @@
"g[" 'Info-prev-reference

;; From evil-integration.el.
"0" 'evil-digit-argument-or-evil-beginning-of-line
(kbd "M-h") 'Info-help ; "h"
(kbd "C-t") 'Info-history-back ; "l"
(kbd "C-o") 'Info-history-back
Expand All @@ -60,17 +57,12 @@

"d" 'Info-directory
"u" 'Info-up
"L" 'Info-history
"gL" 'Info-history ; "L"
"s" 'Info-search
"S" 'Info-search-case-sensitively
"i" 'Info-index
"I" 'Info-virtual-index
"a" 'info-apropos
"w" 'evil-forward-word-begin
"b" 'evil-backward-word-begin
"e" 'evil-forward-word-end

"gg" 'evil-goto-first-line

;; mouse integration
[mouse-2] 'Info-mouse-follow-nearest-node
Expand All @@ -90,44 +82,20 @@
"g8" 'Info-nth-menu-item
"g9" 'Info-nth-menu-item

;; NOTE: We do NOT search the entire buffer, only the narrowed buffer.
"n" evil-collection-evil-search-next
"N" evil-collection-evil-search-previous

;; goto
"gd" 'Info-goto-node ; TODO: "gd" does not match the rationale of "go to definition". Change?
"gG" 'Info-goto-node
"gm" 'Info-menu
"m" 'evil-set-marker ; Else this would be `Info-menu'.
"gt" 'Info-top-node
"t" 'evil-find-char-to ; Else this would be `Info-top-node'.
"gT" 'Info-toc
"T" 'evil-find-char-to-backward ; Else this would be `Info-toc'.
"gf" 'Info-follow-reference
"f" 'evil-find-char ; Else this would be `Info-follow-reference'.
;; TODO: "[" and "]" are Emacs default for fine-grained browsing.
;; We usually use "C-j"/"C-k" for that.
(kbd "C-j") 'Info-forward-node
(kbd "C-k") 'Info-backward-node
"gj" 'Info-next
"gk" 'Info-prev

"g?" 'Info-summary
"?" evil-collection-evil-search-backward) ; Else this would be `Info-summary'.

(evil-collection-define-key 'visual 'Info-mode-map
"l" 'evil-forward-char
"h" 'evil-backward-char

"w" 'evil-forward-word-begin
"b" 'evil-backward-word-begin
"e" 'evil-forward-word-end

"f" 'evil-find-char
"t" 'evil-find-char-to
"T" 'evil-find-char-to-backward

"0" 'evil-digit-argument-or-evil-beginning-of-line
"gg" 'evil-goto-first-line)
"g?" 'Info-summary)

;; yu, Like eww.
(evil-collection-define-operator-key 'yank 'Info-mode-map
Expand Down