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.
This commit is contained in:
parent
8532282e64
commit
67c27119d9
|
@ -134,7 +134,7 @@
|
||||||
;; open
|
;; open
|
||||||
(kbd "RET") 'dired-find-file
|
(kbd "RET") 'dired-find-file
|
||||||
(kbd "S-<return>") 'dired-find-file-other-window
|
(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-find-file-other-window
|
||||||
"go" 'dired-view-file
|
"go" 'dired-view-file
|
||||||
;; sort
|
;; sort
|
||||||
|
|
|
@ -45,6 +45,9 @@
|
||||||
(kbd "C-b") 'scroll-down-command
|
(kbd "C-b") 'scroll-down-command
|
||||||
(kbd "<tab>") 'forward-button
|
(kbd "<tab>") 'forward-button
|
||||||
(kbd "<backtab>") 'backward-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-o") 'help-go-back
|
||||||
(kbd "C-i") 'help-go-forward
|
(kbd "C-i") 'help-go-forward
|
||||||
|
|
|
@ -44,6 +44,9 @@
|
||||||
"h" 'evil-backward-char
|
"h" 'evil-backward-char
|
||||||
(kbd "<tab>") 'Info-next-reference
|
(kbd "<tab>") 'Info-next-reference
|
||||||
(kbd "S-<tab>") 'Info-prev-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.
|
;; From evil-integration.el.
|
||||||
"0" 'evil-digit-argument-or-evil-beginning-of-line
|
"0" 'evil-digit-argument-or-evil-beginning-of-line
|
||||||
|
|
34
readme.org
34
readme.org
|
@ -121,9 +121,9 @@ more.
|
||||||
|
|
||||||
The rules are more-or-less sorted by priority.
|
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~
|
- ~h~, ~j~, ~k~, ~l~
|
||||||
- ~w~, ~W~, ~b~, ~B~, ~e~, ~E~, ~ge~, ~gE~
|
- ~w~, ~W~, ~b~, ~B~, ~e~, ~E~, ~ge~, ~gE~
|
||||||
|
@ -136,22 +136,22 @@ more.
|
||||||
- ~+~, ~-~, ~0~, ~^~, ~$~
|
- ~+~, ~-~, ~0~, ~^~, ~$~
|
||||||
- ~C-i~, ~C-o~
|
- ~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~
|
- ~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~
|
- ~m~
|
||||||
- ='=, =~=
|
- ='=, =~=
|
||||||
|
|
||||||
5. Keep the windowing keys when possible and sensible.
|
6. Keep the windowing keys when possible and sensible.
|
||||||
|
|
||||||
- ~H~, ~L~, ~M~
|
- ~H~, ~L~, ~M~
|
||||||
- ~C-e~, ~C-y~
|
- ~C-e~, ~C-y~
|
||||||
|
@ -160,7 +160,7 @@ more.
|
||||||
- ~C-w~-prefixed bindings.
|
- ~C-w~-prefixed bindings.
|
||||||
- Some ~z~-prefixed bindings (see below).
|
- 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:
|
current mode:
|
||||||
|
|
||||||
- ~a~, ~A~, ~i~, ~I~
|
- ~a~, ~A~, ~i~, ~I~
|
||||||
|
@ -174,16 +174,32 @@ more.
|
||||||
|
|
||||||
Any of those keys can be set to be a prefix key.
|
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.
|
- ~g~ generally stands for "go" and is best used for movements.
|
||||||
- ~z~ is used for scrolling, folding, spell-checking and more.
|
- ~z~ is used for scrolling, folding, spell-checking and more.
|
||||||
|
|
||||||
8. Macro and action keys
|
9. Macro and action keys
|
||||||
|
|
||||||
- ~@~, ~q~
|
- ~@~, ~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
|
** Rationale
|
||||||
|
|
||||||
Many special modes share the same set of similar actions. Those actions should
|
Many special modes share the same set of similar actions. Those actions should
|
||||||
|
|
Loading…
Reference in New Issue