我为什么要另开发一套模式编辑?

刚刚给 GitHub - manateelazycat/one-key: Many commands share one key. 写了一个 one-key-create-menu 的宏。

你上面的代码可以写成下面的简化格式:

    (meow-leader-define-key
       ;; SPC j/k will run the original command in MOTION state.
       '("t" . one-key-menu-tools))

    (one-key-create-menu
      "TOOLS"
      '(
        (("m" . "Mail") . mu4e)
        (("s" . "Shell") . vterm)
        (("t" . "Treemacs") . treemacs)
        (("r" . "Restart") . restart-emacs))
       t)
1 个赞