You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
removing meow = giving up the effort you spend to organize your keybinding
introducing meow = rebuilding your keybind system
It seems meow would not support a binder like meow-normal-define-key :keymap xxx. The author also showed us the more emacs friendly way to bind mode specific keybinds to meow's keypad: bind C-x xxx to that mode map.
However, that's not complete. What if I want to bind some mode-specific keybinds in meow's normal/insert/motion mode?
I actually find out a workaround to do this. The idea here is as well bind keys directly in a major mode map, but with a keybind you'll never use as a prefix key. This prefix key serves as a "bridge" connecting meow and the rest of emacs.
As an example, I'll show how to bind C-j, C-k to org-next-visible-headingorg-previous-visible-heading in meow-normal in org mode map. For simplicity I'll use general-def from general.el, you can still use emacs built-in functions to achieve these.
If I use C-<escape> as a "bridge", then I may do these to bind C-<escape> C-j to org-next-visible-heading and C-<escape> C-k for the other.
This way I can press C-j to trigger org-next-visible-heading.
And one day if you do not use meow, your prefix command my/org-cmd is still here for you to use.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In this pull request the author of meow says
It seems meow would not support a binder like
meow-normal-define-key :keymap xxx. The author also showed us the more emacs friendly way to bind mode specific keybinds to meow's keypad: bindC-x xxxto that mode map.However, that's not complete. What if I want to bind some mode-specific keybinds in meow's normal/insert/motion mode?
I actually find out a workaround to do this. The idea here is as well bind keys directly in a major mode map, but with a keybind you'll never use as a prefix key. This prefix key serves as a "bridge" connecting meow and the rest of emacs.
As an example, I'll show how to bind C-j, C-k to
org-next-visible-headingorg-previous-visible-headingin meow-normal in org mode map. For simplicity I'll usegeneral-deffrom general.el, you can still use emacs built-in functions to achieve these.If I use
C-<escape>as a "bridge", then I may do these to bindC-<escape> C-jtoorg-next-visible-headingandC-<escape> C-kfor the other.(general-def :keymaps '(org-mode-map) "C-<escape>" 'my/org-cmd ) (general-def :prefix-command 'my/org-cmd :prefix-map 'my/org-map "C-j" 'org-next-visible-heading "C-k" 'org-previous-visible-heading )Then in meow:
(meow-normal-define-key '("C-j" . "C-<escape> C-j") '("C-k" . "C-<escape> C-k") ... )This way I can press
C-jto triggerorg-next-visible-heading.And one day if you do not use meow, your prefix command
my/org-cmdis still here for you to use.Beta Was this translation helpful? Give feedback.
All reactions