没用过 GitHub - noctuid/general.el: More convenient key definitions in emacs 一下抓不到重点。
看到它有一个 :non-normal-prefix
关键字,跟我想要有点接近了,比如:
(general-define-key
:keymaps '(normal insert emacs)
:non-normal-prefix "M-o"
"zc" #'evil-close-fold
"zo" #'evil-open-fold
"zm" #'hs-hide-level
"zr" #'evil-open-folds
...)
这一段配置的效果是:
| \ | normal | insert | emacs |
|----|--------|--------------|--------------|
| fn | key | prefix + key | prefix + key |
| | | | |
而我期望的是:
| \ | normal | insert | emacs |
|----|--------------|--------------|--------------|
| fn | key | prefix + key | prefix + key |
| | prefix + key | | |
即 normal
状态下可以使用 key
和 prefix + key
两组快捷键。
应该如何设置?难道要针对 normal
重复一遍配置吗:
(general-define-key
:keymaps '(normal)
:prefix "M-o"
"zc" #'evil-close-fold
"zo" #'evil-open-fold
"zm" #'hs-hide-level
"zr" #'evil-open-folds
...)