Remove leader keymap, replace it with keypad #190
Replies: 6 comments 8 replies
-
Now it's possible to have the popup after single SPC. |
Beta Was this translation helpful? Give feedback.
-
Merged into master. |
Beta Was this translation helpful? Give feedback.
-
I found that there are many C-c keys in some modes(especially orgmode), it seems dirty when mixing leader-define keys with these default keys. So I wonder if there is a way to set a prefix by users, for example, C-c m is equivalent to the space under motion/normal entering the keypad, which can ensure the cleanness of the leader-definr-key. This retains nearly all of the current advantages, including the ability to use C-c m instead of space to enter the leader-define-key in insert mode. And it also supports other non-letter prefixes, for example “space tab” |
Beta Was this translation helpful? Give feedback.
-
It looks like we can have input simulating by setting parent to |
Beta Was this translation helpful? Give feedback.
-
I would like to achieve this:
Is this possible? I guess I can achieve this by binding It would be also good to have an option not to have c/h/x/m/g ability. |
Beta Was this translation helpful? Give feedback.
-
Should this be updated? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Branch:
replace-leader-with-keypad
.The idea is: merging leader and keypad. In vanilla Emacs or distribution like doom,
C-c letter
is used for user defined key bindings.The keymap at
C-c
is calledmode-specific-map
, which is not independent on major/minor modes, but as an entry point for customization.From elisp > Tips > Key Binding Conventions in the manual.
Changes
SPC
will enter KEYPAD state, then there are three types of translation.C-<key>
M-
orC-M-
, modifier onlyC-c <key>
meow-keypad
. Use this command to switch to keypad-mode. Bound toSPC
in NORMAL/MOTION keymap.meow-leader-keymap
will be removed.meow-leader-define-key
will define keys inmode-specific-map
.Example configuration
Benefits
C-c
as secondary leader, works in INSERT state.C-c
as leader, e.g. doom emacs without evil.SPC
?Breaking things
C-c letter
withmeow-leader-define-key
may cause error. But we can prevent by ignoring key binding like this.letter
, sinceC-c non-letter
may be occupied.TODOs
Beta Was this translation helpful? Give feedback.
All reactions