diff options
| author | crocket <748856+crocket@users.noreply.github.com> | 2020-01-23 17:06:43 +0900 |
|---|---|---|
| committer | James N <james@jojojames.com> | 2020-01-23 00:13:18 -0800 |
| commit | 67c27119d954589092bf050ed04fbad933571841 (patch) | |
| tree | 1105781f1acb062a1abfe4a1a6f8715ea5112e32 | |
| parent | 8532282e6492ce92d8c54e43ce9e9ce616d8ab5f (diff) | |
Start ensuring terminal compatibility for Enter and Tab
* readme.org now has a new guideline for terminal compatibility.
* dired, help, and info modes are modified for terminal
compatibility.
| -rw-r--r-- | modes/dired/evil-collection-dired.el | 2 | ||||
| -rw-r--r-- | modes/help/evil-collection-help.el | 3 | ||||
| -rw-r--r-- | modes/info/evil-collection-info.el | 3 | ||||
| -rw-r--r-- | readme.org | 34 |
4 files changed, 32 insertions, 10 deletions
diff --git a/modes/dired/evil-collection-dired.el b/modes/dired/evil-collection-dired.el index 6ade67e..e54dc5a 100644 --- a/modes/dired/evil-collection-dired.el +++ b/modes/dired/evil-collection-dired.el @@ -134,7 +134,7 @@ ;; open (kbd "RET") 'dired-find-file (kbd "S-<return>") 'dired-find-file-other-window - (kbd "M-<return>") 'dired-display-file + (kbd "M-RET") 'dired-display-file "gO" 'dired-find-file-other-window "go" 'dired-view-file ;; sort diff --git a/modes/help/evil-collection-help.el b/modes/help/evil-collection-help.el index b69b03d..b852af8 100644 --- a/modes/help/evil-collection-help.el +++ b/modes/help/evil-collection-help.el @@ -45,6 +45,9 @@ (kbd "C-b") 'scroll-down-command (kbd "<tab>") 'forward-button (kbd "<backtab>") 'backward-button + ;; This exists because <tab> is recognized as C-i on terminals. + "g]" 'forward-button + "g[" 'backward-button (kbd "C-o") 'help-go-back (kbd "C-i") 'help-go-forward diff --git a/modes/info/evil-collection-info.el b/modes/info/evil-collection-info.el index 12e8187..23184f0 100644 --- a/modes/info/evil-collection-info.el +++ b/modes/info/evil-collection-info.el @@ -44,6 +44,9 @@ "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. + "g]" 'Info-next-reference + "g[" 'Info-prev-reference ;; From evil-integration.el. "0" 'evil-digit-argument-or-evil-beginning-of-line @@ -121,9 +121,9 @@ more. The rules are more-or-less sorted by priority. - 0. Don't bind anything to ~:~ nor ~<escape>~. + 1. Don't bind anything to ~:~ nor ~<escape>~. - 1. Keep the movement keys when possible and sensible. + 2. Keep the movement keys when possible and sensible. - ~h~, ~j~, ~k~, ~l~ - ~w~, ~W~, ~b~, ~B~, ~e~, ~E~, ~ge~, ~gE~ @@ -136,22 +136,22 @@ more. - ~+~, ~-~, ~0~, ~^~, ~$~ - ~C-i~, ~C-o~ - 2. Keep the yanking and register keys when possible and sensible. + 3. Keep the yanking and register keys when possible and sensible. - ~y~, ~Y~ - ="= - 3. Keep the search keys when possible and sensible. + 4. Keep the search keys when possible and sensible. - ~/~, ~?~ - ~#~, ~*~ - 4. Keep the mark keys when possible and sensible. + 5. Keep the mark keys when possible and sensible. - ~m~ - ='=, =~= - 5. Keep the windowing keys when possible and sensible. + 6. Keep the windowing keys when possible and sensible. - ~H~, ~L~, ~M~ - ~C-e~, ~C-y~ @@ -160,7 +160,7 @@ more. - ~C-w~-prefixed bindings. - Some ~z~-prefixed bindings (see below). - 6. The following keys are free when insert state does not make sense in the + 7. The following keys are free when insert state does not make sense in the current mode: - ~a~, ~A~, ~i~, ~I~ @@ -174,16 +174,32 @@ more. Any of those keys can be set to be a prefix key. - 7. Prefix keys: ~g~ and ~z~ are the ubiquitous prefix keys. + 8. Prefix keys: ~g~ and ~z~ are the ubiquitous prefix keys. - ~g~ generally stands for "go" and is best used for movements. - ~z~ is used for scrolling, folding, spell-checking and more. - 8. Macro and action keys + 9. Macro and action keys - ~@~, ~q~ - ~.~ + 10. Ensure terminal compatibility without sacrificing GUI key bindings. + + - Tab key + - Tab key is recognized as ~<tab>~ in GUI and ~TAB~ in terminal. + ~TAB~ equals ~C-i~. + - Since ~C-i~ is bound to jumping forward for vim compatibility, + bind ~g[~ and ~g]~ to the functions that Shift+Tab and Tab + are bound to on GUI for terminal compatibility. + - Enter key + - Enter key is recognized as ~<return>~ in GUI and ~RET~ in terminal. + ~RET~ equals ~Ctrl+m~. + - Bind only ~RET~ and ~M-RET~. Or, bind ~RET~ and ~M-RET~ to the same + functions ~<return>~ and ~<M-return>~ are bound to. + - ~S-RET~ is impossible on terminal. Bind ~<S-return>~ and a vacant key + to the same function for terminal compatibility. + ** Rationale Many special modes share the same set of similar actions. Those actions should |
