如何让 Meow KEYPAD 能够快捷使用 minor mode map 中的按键?

假设我没有使用Meow,然后我lsp的按键配置是

(global-set-key (kbd "C-c ll") 'lsp)
(define-key lsp-mode-map (kbd "C-c lr") 'lsp-restart-workspace)

我可以通过C-c ll 或者 C-c lr去使用这两个命令,概念上他们都属于lsp相关的命令,按键上都通过C-c l前缀去访问,实现上一个在global map用于激活lsp模式,一个在lsp-mode-map不会在我使用其他模式时污染按键表,我还可以在其他模式的 minor mode map 里面绑定 C-c l 前缀的快捷键去别的功能。

现在,我开始使用Meow,并且只做了最少限度的配置:

;; qwerty layout configurations
(require 'meow)
(meow-setup)
(meow-global-mode 1)

没有额外针对 Meow 特别定制配置。

现在,我可以用 SPC ll 使用 lsp 命令,但是即使在激活了 lsp-mode 后,我想要使用 lsp-restart-workspace,我不能用 SPC lr,需要用SPC c SPC lr (按键序列太长),或者还是使用 C-c lr(按键上不统一)。

我看到作者对Meow的设想是这样的 add mode and meow state specific keymaps by turbana · Pull Request #126 · meow-edit/meow (github.com) :“

That is:

  • meow must not be invasive
  • meow’s configuration can be and should be limited in a single .el file, just like other packages
  • remove meow from your configuration should be as simple as deleting a single file

Additionally, these cases are what I’m trying to avoid:

  • configure meow for every major/minor modes
  • removing meow = giving up the effort you spend to organize your keybinding
  • introducing meow = rebuilding your keybind system

但是,目前我提到的问题,如果想要同时达到:

  1. 较短的按键序列 (不要 SPC c SPC lr)
  2. 概念上统一的命令有统一的按键前缀
  3. 不污染全局按键表
  4. 没有针对 Meow 的特别设置 (3和4其实是同时被遵守或违背的)

我没有看到解决方法。按你的方法,引入一个新的全局按键,再自己定制一个表确实可以解决1和2,但是就违背了3和4,同时也和 Meow 作者提出的理念有分歧。