redguardtoo / emacs.d

Fast and robust Emacs setup.
http://blog.binchen.org
GNU General Public License v3.0
2.39k stars 619 forks source link

`my-comma-leader-def` for {major/minor}-mode-map? #1043

Closed phye closed 1 year ago

phye commented 1 year ago

I'm currently heavily using my-comma-leader-def (or space/semicolumn families) to define key bindings, and most of the time it works great. However, sometims I'm expecting certain shortcuts to be bound to different functions in different mode map instead of the global one. For example, I may bind ,gg to git-grep when programing, but may want to hit ,gg to go to head of file in pdf-mode.

Do you know how can I use my-comma-leader-def to make shortcuts for certain mode only?

phye commented 1 year ago

BTW, I mean in evil insert mode (where default to emacs such as rg-mode)

redguardtoo commented 1 year ago

See https://github.com/noctuid/general.el

phye commented 1 year ago

Thanks!