meow-edit / meow

Yet another modal editing on Emacs / 猫态编辑
GNU General Public License v3.0
1.09k stars 127 forks source link

KEYPAD模式的一个建议 #47

Closed driftcrow closed 2 years ago

driftcrow commented 3 years ago

刚使用meow,对于KEYPAD的理解可能不全面,也还没有看代码,但使用中体会是采用了Fallback机制,当SPC+x 进入KEYPAD模式时后继按键如x 是先找Ctrl-x ,没有的话再Fallback到x。使用中觉得有点不太合理,提个建议供参考:

觉得KEYPAD模式的Fallbak 机制 当按 SPC-x 进入KP模式时,再按 x 时应当 首先匹配 C-x x,没有再匹配 C-x C-x,C-x M-x 。。。,如果要直接匹配C-x C-x 采取 SPC-x-SPC-x 进行操作。

考虑的理由是实际的键绑定 C-x x 类型比C-x C-x这种好像要多些,现有模式下要直接匹配 C-x x按键序列需要按 SPC-x SPC-x ,一是复杂,比直接按的键数要多,二是不便于记忆,有点反直觉,相对于明确SPC直接替代一个控制键要更清晰明了一点

SPC-x x 匹配 C-x x,没有的话再匹配C-x C-x, SPC-x SPC-x 直接匹配 C-x C-x

DogLooksGood commented 3 years ago

结论是不会做这个修改,下面是这个问题的解决方案和我的一些想法。

经过一些思考和调查,感觉连续按住 Ctrl 的快捷键的数量是远大于单键的。Emacs 中按键的分配给我的感觉大概是: C- 是主体,单键是分类下的子项,M- 是大概行为的强化。

Fallback 行为仅仅是针对单键情况的,而不是各种情况一个一个找(按键数量不是最重要的,太复杂的 fallback 会降低确定性)。现有的 fallback 的主要原因是长命令后的子命令对应 C-x C-x x 的情况。比如这一组命令:

这是 Emacs 中比较典形的快捷键。 对于 C-x ? 这样的场景,如果有比要的话可以直接定义到 leader keymap 里面,比如说 C-x b = SPC x SPC b 按起来不方便,放到 leader 里面的 b 那就是 SPC b

有尝试去实现完全可配置的 KEYPAD 规则,但是需要配很多的地方,估计一般用户搞不明白要怎么用。

driftcrow commented 3 years ago

嗯,规则是有点复杂

driftcrow commented 3 years ago

KEYPAD配置的这个方式觉得还有些不太适应,增加了些按键和记忆成本,最大的不适应是和正常emacs按键序列的结果不一致,经常会按错。最好是可以增加一个配置项能够选择优先配置的方式。也许也有人会有相同的感受,保留这个建议

DogLooksGood commented 3 years ago

其实这个规则,可以参照这里。 https://github.com/emacsorphanage/god-mode

并不能认为 SPC x 是 Ctrl x 的意思,因为这个 keypad-start,不一定要放在 leader 里面。

driftcrow commented 3 years ago

嗯,这个规则本身是好的,只是这样的话我原本用KEYPAD 绑定 前缀的含义就不太大了,因为这两个模式的行为不一致,就增加了选择和记忆成本。有些矛盾。这只是我的个人需求,我再学习下吧

DogLooksGood commented 3 years ago

我觉得这里面含着两个问题,不知道对于你来说是哪种情况。

  1. 触发的 C- 需要按 SPC,后续的不用按,行为感觉不一致。
  2. “C- 不需要前缀,而单键需要前缀”这个规则你觉得不合理。

对于1,一种办法是把 NORMAL 和 MOTION 下的 c x g m 之类的直接绑定 meow-keypad-start

我会再看一下实现2的可能性。

driftcrow commented 3 years ago

对我的理解是2的情况,而且2也并不是不合理,只是和Emacs的默认行为不致,而我觉得保持行为一致是有其意义的,这样我在插入模式不方便进入KEYPAD模式的时候可以使用Emacs的键绑定并且不用考虑1的问题。

或者meow-leader绑定前缀键的时候不进入Keypad模式,就提供模拟输入前缀键就好了。

DogLooksGood commented 3 years ago

感觉你不太可能会选择 C- 需要空格前缀的方式,因为 Emacs 里面大量命令都是连续的 C- 。

driftcrow commented 3 years ago

查看了下Doom下的键绑定,C-x x x模式的键绑定是多数,可能这只是Doom的习惯,我个人也习惯这种,持续用小指按Ctrl键我手会痛

* Local Keybindings
* Global Keybindings
| key                                       | command                                              | previous                                             |
|-------------------------------------------+------------------------------------------------------+------------------------------------------------------|
| =<remap> <switch-to-buffer>=              | ~+ivy/switch-buffer~                                 | ~nil~                                                |
| =<remap> <switch-to-buffer-other-window>= | ~+ivy/switch-buffer-other-window~                    | ~nil~                                                |
| =<remap> <persp-switch-to-buffer>=        | ~+ivy/switch-workspace-buffer~                       | ~nil~                                                |
| =<remap> <evil-show-jumps>=               | ~+ivy/jump-list~                                     | ~nil~                                                |
| =<remap> <apropos>=                       | ~counsel-apropos~                                    | ~nil~                                                |
| =<remap> <bookmark-jump>=                 | ~counsel-bookmark~                                   | ~nil~                                                |
| =<remap> <compile>=                       | ~+ivy/compile~                                       | ~nil~                                                |
| =<remap> <describe-bindings>=             | ~counsel-descbinds~                                  | ~nil~                                                |
| =<remap> <describe-face>=                 | ~counsel-faces~                                      | ~nil~                                                |
| =<remap> <describe-function>=             | ~counsel-describe-function~                          | ~helpful-callable~                                   |
| =<remap> <describe-variable>=             | ~counsel-describe-variable~                          | ~helpful-variable~                                   |
| =<remap> <describe-symbol>=               | ~counsel-describe-symbol~                            | ~helpful-symbol~                                     |
| =<remap> <evil-ex-registers>=             | ~counsel-evil-registers~                             | ~nil~                                                |
| =<remap> <evil-show-marks>=               | ~counsel-mark-ring~                                  | ~nil~                                                |
| =<remap> <execute-extended-command>=      | ~counsel-M-x~                                        | ~nil~                                                |
| =<remap> <find-file>=                     | ~counsel-find-file~                                  | ~nil~                                                |
| =<remap> <find-library>=                  | ~counsel-find-library~                               | ~nil~                                                |
| =<remap> <imenu>=                         | ~counsel-imenu~                                      | ~nil~                                                |
| =<remap> <info-lookup-symbol>=            | ~counsel-info-lookup-symbol~                         | ~nil~                                                |
| =<remap> <load-theme>=                    | ~counsel-load-theme~                                 | ~nil~                                                |
| =<remap> <locate>=                        | ~counsel-locate~                                     | ~nil~                                                |
| =<remap> <org-goto>=                      | ~counsel-org-goto~                                   | ~nil~                                                |
| =<remap> <org-set-tags-command>=          | ~counsel-org-tag~                                    | ~nil~                                                |
| =<remap> <projectile-compile-project>=    | ~+ivy/project-compile~                               | ~nil~                                                |
| =<remap> <recentf-open-files>=            | ~counsel-recentf~                                    | ~nil~                                                |
| =<remap> <set-variable>=                  | ~counsel-set-variable~                               | ~nil~                                                |
| =<remap> <swiper>=                        | ~counsel-grep-or-swiper~                             | ~nil~                                                |
| =<remap> <insert-char>=                   | ~counsel-unicode-char~                               | ~nil~                                                |
| =<remap> <yank-pop>=                      | ~counsel-yank-pop~                                   | ~nil~                                                |
| =<remap> <projectile-find-file>=          | ~+ivy/projectile-find-file~                          | ~nil~                                                |
| =<remap> <projectile-find-dir>=           | ~counsel-projectile-find-dir~                        | ~nil~                                                |
| =<remap> <projectile-switch-to-buffer>=   | ~counsel-projectile-switch-to-buffer~                | ~nil~                                                |
| =<remap> <projectile-grep>=               | ~counsel-projectile-grep~                            | ~nil~                                                |
| =<remap> <projectile-ag>=                 | ~counsel-projectile-ag~                              | ~nil~                                                |
| =<remap> <projectile-switch-project>=     | ~counsel-projectile-switch-project~                  | ~nil~                                                |
| =<M-up>=                                  | ~drag-stuff-up~                                      | ~nil~                                                |
| =<M-down>=                                | ~drag-stuff-down~                                    | ~nil~                                                |
| =s-`=                                     | ~other-frame~                                        | ~nil~                                                |
| =s-w=                                     | ~delete-window~                                      | ~nil~                                                |
| =s-W=                                     | ~delete-frame~                                       | ~nil~                                                |
| =s-n=                                     | ~+default/new-buffer~                                | ~nil~                                                |
| =s-N=                                     | ~make-frame~                                         | ~nil~                                                |
| =s-q=                                     | ~save-buffers-kill-terminal~                         | ~nil~                                                |
| =C-s-f=                                   | ~toggle-frame-fullscreen~                            | ~nil~                                                |
| =s-l=                                     | ~goto-line~                                          | ~nil~                                                |
| =s-f=                                     | ~swiper~                                             | ~nil~                                                |
| =s-z=                                     | ~undo~                                               | ~nil~                                                |
| =s-Z=                                     | ~redo~                                               | ~nil~                                                |
| =s-c=                                     | ~copy-region-as-kill~                                | ~nil~                                                |
| =s-v=                                     | ~yank~                                               | ~nil~                                                |
| =s-s=                                     | ~save-buffer~                                        | ~nil~                                                |
| =s-x=                                     | ~execute-extended-command~                           | ~nil~                                                |
| =s-+=                                     | ~doom/reset-font-size~                               | ~nil~                                                |
| =s-==                                     | ~doom/increase-font-size~                            | ~nil~                                                |
| =s--=                                     | ~doom/decrease-font-size~                            | ~nil~                                                |
| =s-a=                                     | ~mark-whole-buffer~                                  | ~nil~                                                |
| =s-/=                                     | ~(closure (t) (&rest _) (interactive) (save-excursi~ | ~nil~                                                |
| =<s-backspace>=                           | ~doom/backward-kill-to-bol-and-indent~               | ~nil~                                                |
| =<s-left>=                                | ~doom/backward-to-bol-or-indent~                     | ~nil~                                                |
| =<s-right>=                               | ~doom/forward-to-last-non-comment-or-eol~            | ~nil~                                                |
| =<M-backspace>=                           | ~backward-kill-word~                                 | ~nil~                                                |
| =<M-left>=                                | ~backward-word~                                      | ~drag-stuff-left~                                    |
| =<M-right>=                               | ~forward-word~                                       | ~drag-stuff-right~                                   |
| =C-a=                                     | ~doom/backward-to-bol-or-indent~                     | ~move-beginning-of-line~                             |
| =C-e=                                     | ~doom/forward-to-last-non-comment-or-eol~            | ~move-end-of-line~                                   |
| =<C-down-mouse-2>=                        | ~(closure (t) (&rest _) (interactive) (text-scale-s~ | ~facemenu-menu~                                      |
| =<remap> <newline>=                       | ~newline-and-indent~                                 | ~nil~                                                |
| =S-RET=                                   | ~+default/newline~                                   | ~nil~                                                |
| =<S-return>=                              | ~+default/newline~                                   | ~nil~                                                |
| =C-j=                                     | ~+default/newline~                                   | ~electric-newline-and-maybe-indent~                  |
| =C-RET=                                   | ~+default/newline-below~                             | ~nil~                                                |
| =<C-return>=                              | ~+default/newline-below~                             | ~nil~                                                |
| =C-S-RET=                                 | ~+default/newline-above~                             | ~nil~                                                |
| =<C-S-return>=                            | ~+default/newline-above~                             | ~nil~                                                |
| =s-RET=                                   | ~+default/newline-below~                             | ~nil~                                                |
| =<s-return>=                              | ~+default/newline-below~                             | ~nil~                                                |
| =S-s-RET=                                 | ~+default/newline-above~                             | ~nil~                                                |
| =<S-s-return>=                            | ~+default/newline-above~                             | ~nil~                                                |
| =C-'=                                     | ~imenu~                                              | ~nil~                                                |
| =M-+=                                     | ~doom/reset-font-size~                               | ~nil~                                                |
| =M-==                                     | ~doom/increase-font-size~                            | ~count-words-region~                                 |
| =M--=                                     | ~doom/decrease-font-size~                            | ~negative-argument~                                  |
| =C-S-s=                                   | ~swiper~                                             | ~nil~                                                |
| =C-S-r=                                   | ~ivy-resume~                                         | ~nil~                                                |
| =C-x b=                                   | ~persp-switch-to-buffer~                             | ~switch-to-buffer~                                   |
| =C-x B=                                   | ~switch-to-buffer~                                   | ~nil~                                                |
| =C-x 4 B=                                 | ~switch-to-buffer-other-window~                      | ~nil~                                                |
| =C-x 4 b=                                 | ~+ivy/switch-workspace-buffer-other-window~          | ~switch-to-buffer-other-window~                      |
| =C-x C-b=                                 | ~ibuffer~                                            | ~list-buffers~                                       |
| =C-x K=                                   | ~doom/kill-this-buffer-in-all-windows~               | ~nil~                                                |
| =C-;=                                     | ~+company/complete~                                  | ~nil~                                                |
| =C-==                                     | ~er/expand-region~                                   | ~nil~                                                |
| =C--=                                     | ~er/contract-region~                                 | ~negative-argument~                                  |
| =C-M-y=                                   | ~counsel-yank-pop~                                   | ~nil~                                                |
| =C-x p=                                   | ~+popup/other~                                       | ~(keymap (120 . project-execute-extended-command) (~ |
| =C-`=                                     | ~+popup/toggle~                                      | ~nil~                                                |
| =C-~=                                     | ~+popup/raise~                                       | ~nil~                                                |
| =<f9>=                                    | ~+treemacs/toggle~                                   | ~nil~                                                |
| =<C-f9>=                                  | ~treemacs-find-file~                                 | ~nil~                                                |
| =M-h=                                     | ~windmove-left~                                      | ~mark-paragraph~                                     |
| =M-l=                                     | ~windmove-right~                                     | ~downcase-word~                                      |
| =M-j=                                     | ~windmove-down~                                      | ~default-indent-new-line~                            |
| =M-k=                                     | ~windmove-up~                                        | ~kill-sentence~                                      |
| =C-t=                                     | ~+workspace/new~                                     | ~transpose-chars~                                    |
| =C-S-t=                                   | ~+workspace/display~                                 | ~nil~                                                |
| =M-1=                                     | ~+workspace/switch-to-0~                             | ~digit-argument~                                     |
| =M-2=                                     | ~+workspace/switch-to-1~                             | ~digit-argument~                                     |
| =M-3=                                     | ~+workspace/switch-to-2~                             | ~digit-argument~                                     |
| =M-4=                                     | ~+workspace/switch-to-3~                             | ~digit-argument~                                     |
| =M-5=                                     | ~+workspace/switch-to-4~                             | ~digit-argument~                                     |
| =M-6=                                     | ~+workspace/switch-to-5~                             | ~digit-argument~                                     |
| =M-7=                                     | ~+workspace/switch-to-6~                             | ~digit-argument~                                     |
| =M-8=                                     | ~+workspace/switch-to-7~                             | ~digit-argument~                                     |
| =M-9=                                     | ~+workspace/switch-to-8~                             | ~digit-argument~                                     |
| =M-0=                                     | ~+workspace/switch-to-final~                         | ~digit-argument~                                     |
| =M-g M-g=                                 | ~hydra-avy/body~                                     | ~goto-line~                                          |
| =s-m=                                     | ~my-maximize-or-enlargen-window~                     | ~nil~                                                |
| =C-c b h=                                 | ~+doom-dashboard/open~                               | ~2~                                                  |
| =C-c b R=                                 | ~vc-revert-buffer~                                   | ~2~                                                  |
| =C-c b -=                                 | ~doom/toggle-narrow-buffer~                          | ~2~                                                  |
| =C-c b [=                                 | ~previous-buffer~                                    | ~2~                                                  |
| =C-c b ]=                                 | ~next-buffer~                                        | ~2~                                                  |
| =C-c b b=                                 | ~persp-switch-to-buffer~                             | ~2~                                                  |
| =C-c b B=                                 | ~switch-to-buffer~                                   | ~2~                                                  |
| =C-c b c=                                 | ~clone-indirect-buffer~                              | ~2~                                                  |
| =C-c b C=                                 | ~clone-indirect-buffer-other-window~                 | ~2~                                                  |
| =C-c b d=                                 | ~kill-current-buffer~                                | ~2~                                                  |
| =C-c b i=                                 | ~ibuffer~                                            | ~2~                                                  |
| =C-c b k=                                 | ~kill-current-buffer~                                | ~2~                                                  |
| =C-c b K=                                 | ~doom/kill-all-buffers~                              | ~2~                                                  |
| =C-c b l=                                 | ~evil-switch-to-windows-last-buffer~                 | ~2~                                                  |
| =C-c b m=                                 | ~bookmark-set~                                       | ~2~                                                  |
| =C-c b M=                                 | ~bookmark-delete~                                    | ~2~                                                  |
| =C-c b n=                                 | ~next-buffer~                                        | ~2~                                                  |
| =C-c b N=                                 | ~evil-buffer-new~                                    | ~2~                                                  |
| =C-c b O=                                 | ~doom/kill-other-buffers~                            | ~2~                                                  |
| =C-c b p=                                 | ~previous-buffer~                                    | ~2~                                                  |
| =C-c b r=                                 | ~revert-buffer~                                      | ~2~                                                  |
| =C-c b s=                                 | ~basic-save-buffer~                                  | ~2~                                                  |
| =C-c b S=                                 | ~evil-write-all~                                     | ~2~                                                  |
| =C-c b u=                                 | ~doom/sudo-save-buffer~                              | ~2~                                                  |
| =C-c b x=                                 | ~doom/open-scratch-buffer~                           | ~2~                                                  |
| =C-c b X=                                 | ~doom/switch-to-scratch-buffer~                      | ~2~                                                  |
| =C-c b z=                                 | ~bury-buffer~                                        | ~2~                                                  |
| =C-c b Z=                                 | ~doom/kill-buried-buffers~                           | ~2~                                                  |
| =C-c t T=                                 | ~hydra-toggle/body~                                  | ~2~                                                  |
| =C-c s q=                                 | ~org-ql-search~                                      | ~2~                                                  |

* Pdf-View-Mode-Map Keybindings
| key | command               | previous      |
|-----+-----------------------+---------------|
| =q= | ~kill-current-buffer~ | ~quit-window~ |

* Lsp-Ui-Peek-Mode-Map Keybindings
| key   | command                         | previous |
|-------+---------------------------------+----------|
| =j=   | ~lsp-ui-peek--select-next~      | ~nil~    |
| =k=   | ~lsp-ui-peek--select-prev~      | ~nil~    |
| =C-k= | ~lsp-ui-peek--select-prev-file~ | ~nil~    |
| =C-j= | ~lsp-ui-peek--select-next-file~ | ~nil~    |

* Markdown-Mode-Map Keybindings
| key         | command                          | previous |
|-------------+----------------------------------+----------|
| =C-c l '=   | ~markdown-edit-code-block~       | ~2~      |
| =C-c l o=   | ~markdown-open~                  | ~2~      |
| =C-c l p=   | ~markdown-preview~               | ~2~      |
| =C-c l e=   | ~markdown-export~                | ~2~      |
| =C-c l i T= | ~markdown-toc-generate-toc~      | ~3~      |
| =C-c l i -= | ~markdown-insert-hr~             | ~3~      |
| =C-c l i 1= | ~markdown-insert-header-atx-1~   | ~3~      |
| =C-c l i 2= | ~markdown-insert-header-atx-2~   | ~3~      |
| =C-c l i 3= | ~markdown-insert-header-atx-3~   | ~3~      |
| =C-c l i 4= | ~markdown-insert-header-atx-4~   | ~3~      |
| =C-c l i 5= | ~markdown-insert-header-atx-5~   | ~3~      |
| =C-c l i 6= | ~markdown-insert-header-atx-6~   | ~3~      |
| =C-c l i C= | ~markdown-insert-gfm-code-block~ | ~3~      |
| =C-c l i P= | ~markdown-pre-region~            | ~3~      |
| =C-c l i Q= | ~markdown-blockquote-region~     | ~3~      |
| =C-c l i [= | ~markdown-insert-gfm-checkbox~   | ~3~      |
| =C-c l i b= | ~markdown-insert-bold~           | ~3~      |
| =C-c l i c= | ~markdown-insert-code~           | ~3~      |
| =C-c l i e= | ~markdown-insert-italic~         | ~3~      |
| =C-c l i f= | ~markdown-insert-footnote~       | ~3~      |
| =C-c l i h= | ~markdown-insert-header-dwim~    | ~3~      |
| =C-c l i i= | ~markdown-insert-italic~         | ~3~      |
| =C-c l i k= | ~markdown-insert-kbd~            | ~3~      |
| =C-c l i l= | ~markdown-insert-link~           | ~3~      |
| =C-c l i p= | ~markdown-insert-pre~            | ~3~      |
| =C-c l i q= | ~markdown-insert-blockquote~     | ~3~      |
| =C-c l i s= | ~markdown-insert-strike-through~ | ~3~      |
| =C-c l i t= | ~markdown-insert-table~          | ~3~      |
| =C-c l i w= | ~markdown-insert-wiki-link~      | ~3~      |

* Eshell-Mode-Map Keybindings
| key                                              | command                       | previous |
|--------------------------------------------------+-------------------------------+----------|
| =C-d=                                            | ~+eshell/quit-or-delete-char~ | ~nil~    |
| =C-s=                                            | ~+eshell/search-history~      | ~nil~    |
| =C-e=                                            | ~end-of-line~                 | ~nil~    |
| =C-c s=                                          | ~+eshell/split-below~         | ~nil~    |
| =C-c v=                                          | ~+eshell/split-right~         | ~nil~    |
| =C-c x=                                          | ~+eshell/kill-and-close~      | ~nil~    |
| =<remap> <split-window-below>=                   | ~+eshell/split-below~         | ~nil~    |
| =<remap> <split-window-right>=                   | ~+eshell/split-right~         | ~nil~    |
| =<remap> <doom/backward-to-bol-or-indent>=       | ~eshell-bol~                  | ~nil~    |
| =<remap> <doom/backward-kill-to-bol-and-indent>= | ~eshell-kill-input~           | ~nil~    |
| =<remap> <evil-delete-back-to-indentation>=      | ~eshell-kill-input~           | ~nil~    |
| =<remap> <evil-window-split>=                    | ~+eshell/split-below~         | ~nil~    |
| =<remap> <evil-window-vsplit>=                   | ~+eshell/split-right~         | ~nil~    |
| =C-l=                                            | ~eshell/clear~                | ~nil~    |
| =C-c l b=                                        | ~eshell-insert-buffer-name~   | ~2~      |
| =C-c l e=                                        | ~eshell-insert-envvar~        | ~2~      |
| =C-c l s=                                        | ~+eshell/search-history~      | ~2~      |

* Python-Mode-Map Keybindings
| key         | command                       | previous                 |
|-------------+-------------------------------+--------------------------|
| =C-c l i i= | ~pyimport-insert-missing~     | ~2~                      |
| =C-c l i o= | ~+python/optimize-imports~    | ~2~                      |
| =C-c l i s= | ~py-isort-buffer~             | ~nil~                    |
| =C-c l i r= | ~py-isort-region~             | ~pyimport-remove-unused~ |
| =C-c l t a= | ~python-pytest~               | ~3~                      |
| =C-c l t f= | ~python-pytest-file-dwim~     | ~3~                      |
| =C-c l t F= | ~python-pytest-file~          | ~3~                      |
| =C-c l t t= | ~python-pytest-function-dwim~ | ~3~                      |
| =C-c l t T= | ~python-pytest-function~      | ~3~                      |
| =C-c l t r= | ~python-pytest-repeat~        | ~3~                      |
| =C-c l t p= | ~python-pytest-dispatch~      | ~3~                      |
| =C-c l e a= | ~pipenv-activate~             | ~3~                      |
| =C-c l e d= | ~pipenv-deactivate~           | ~3~                      |
| =C-c l e i= | ~pipenv-install~              | ~3~                      |
| =C-c l e l= | ~pipenv-lock~                 | ~3~                      |
| =C-c l e o= | ~pipenv-open~                 | ~3~                      |
| =C-c l e r= | ~pipenv-run~                  | ~3~                      |
| =C-c l e s= | ~pipenv-shell~                | ~3~                      |
| =C-c l e u= | ~pipenv-uninstall~            | ~3~                      |

* Company-Search-Map Keybindings
| key   | command                                              | previous                        |
|-------+------------------------------------------------------+---------------------------------|
| =C-n= | ~company-search-repeat-forward~                      | ~company-search-other-char~     |
| =C-p= | ~company-search-repeat-backward~                     | ~company-search-other-char~     |
| =C-s= | ~(closure (t) (&rest _) (interactive) (company-sear~ | ~company-search-repeat-forward~ |

* Company-Active-Map Keybindings
| key         | command                            | previous                    |
|-------------+------------------------------------+-----------------------------|
| =C-o=       | ~company-search-kill-others~       | ~nil~                       |
| =C-n=       | ~company-select-next~              | ~nil~                       |
| =C-p=       | ~company-select-previous~          | ~nil~                       |
| =C-h=       | ~company-quickhelp-manual-begin~   | ~company-show-doc-buffer~   |
| =C-S-h=     | ~company-show-doc-buffer~          | ~nil~                       |
| =C-s=       | ~company-search-candidates~        | ~company-search-candidates~ |
| =M-s=       | ~company-filter-candidates~        | ~nil~                       |
| =<C-tab>=   | ~company-complete-common-or-cycle~ | ~nil~                       |
| =<tab>=     | ~company-complete-common-or-cycle~ | ~company-complete-common~   |
| =<backtab>= | ~company-select-previous~          | ~nil~                       |
| =C-RET=     | ~counsel-company~                  | ~nil~                       |

* Counsel-Ag-Map Keybindings
| key     | command                             | previous |
|---------+-------------------------------------+----------|
| =C-SPC= | ~ivy-call-and-recenter~             | ~nil~    |
| =M-RET= | ~+ivy/git-grep-other-window-action~ | ~nil~    |

* Ivy-Switch-Buffer-Map Keybindings
| key   | command                      | previous |
|-------+------------------------------+----------|
| =C-s= | ~counsel-minibuffer-history~ | ~nil~    |

* Ivy-Minibuffer-Map Keybindings
| key                                   | command                      | previous                   |
|---------------------------------------+------------------------------+----------------------------|
| =C-s=                                 | ~counsel-minibuffer-history~ | ~nil~                      |
| =<remap> <doom/delete-backward-word>= | ~ivy-backward-kill-word~     | ~nil~                      |
| =C-c C-e=                             | ~+ivy/woccur~                | ~nil~                      |
| =C-o=                                 | ~ivy-dispatching-done~       | ~hydra-ivy/body~           |
| =M-o=                                 | ~hydra-ivy/body~             | ~ivy-dispatching-done~     |
| =TAB=                                 | ~ivy-alt-done~               | ~ivy-partial-or-done~      |
| =C-g=                                 | ~keyboard-escape-quit~       | ~minibuffer-keyboard-quit~ |

* Info-Mode-Map Keybindings
| key | command               | previous |
|-----+-----------------------+----------|
| =o= | ~link-hint-open-link~ | ~nil~    |

* Org-Agenda-Mode-Map Keybindings
| key         | command                           | previous |
|-------------+-----------------------------------+----------|
| =C-c l d d= | ~org-agenda-deadline~             | ~2~      |
| =C-c l d s= | ~org-agenda-schedule~             | ~2~      |
| =C-c l c c= | ~org-agenda-clock-cancel~         | ~3~      |
| =C-c l c g= | ~org-agenda-clock-goto~           | ~3~      |
| =C-c l c i= | ~org-agenda-clock-in~             | ~3~      |
| =C-c l c o= | ~org-agenda-clock-out~            | ~3~      |
| =C-c l c r= | ~org-agenda-clockreport-mode~     | ~3~      |
| =C-c l c s= | ~org-agenda-show-clocking-issues~ | ~3~      |
| =C-c l p d= | ~org-agenda-priority-down~        | ~3~      |
| =C-c l p p= | ~org-agenda-priority~             | ~3~      |
| =C-c l p u= | ~org-agenda-priority-up~          | ~3~      |
| =C-c l q=   | ~org-agenda-set-tags~             | ~nil~    |
| =C-c l r=   | ~org-agenda-refile~               | ~nil~    |
| =C-c l t=   | ~org-agenda-todo~                 | ~nil~    |

* Org-Mode-Map Keybindings
| key                                                 | command                                              | previous                                  |
|-----------------------------------------------------+------------------------------------------------------+-------------------------------------------|
| =C-c C-S-l=                                         | ~+org/remove-link~                                   | ~nil~                                     |
| =C-c TAB=                                           | ~org-toggle-inline-images~                           | ~org-ctrl-c-tab~                          |
| =S-RET=                                             | ~+org/shift-return~                                  | ~org-table-copy-down~                     |
| =C-RET=                                             | ~+org/insert-item-below~                             | ~nil~                                     |
| =C-S-RET=                                           | ~+org/insert-item-above~                             | ~nil~                                     |
| =C-M-RET=                                           | ~org-insert-subheading~                              | ~nil~                                     |
| =<C-return>=                                        | ~+org/insert-item-below~                             | ~org-insert-heading-respect-content~      |
| =<C-S-return>=                                      | ~+org/insert-item-above~                             | ~org-insert-todo-heading-respect-content~ |
| =<C-M-return>=                                      | ~org-insert-subheading~                              | ~nil~                                     |
| =<s-return>=                                        | ~+org/insert-item-below~                             | ~nil~                                     |
| =<s-S-return>=                                      | ~+org/insert-item-above~                             | ~nil~                                     |
| =<s-M-return>=                                      | ~org-insert-subheading~                              | ~nil~                                     |
| =<remap> <doom/backward-to-bol-or-indent>=          | ~org-beginning-of-line~                              | ~nil~                                     |
| =<remap> <doom/forward-to-last-non-comment-or-eol>= | ~org-end-of-line~                                    | ~nil~                                     |
| =C-c l #=                                           | ~org-update-statistics-cookies~                      | ~2~                                       |
| =C-c l '=                                           | ~org-edit-special~                                   | ~2~                                       |
| =C-c l *=                                           | ~org-ctrl-c-star~                                    | ~2~                                       |
| =C-c l +=                                           | ~org-ctrl-c-minus~                                   | ~2~                                       |
| =C-c l ,=                                           | ~org-switchb~                                        | ~2~                                       |
| =C-c l .=                                           | ~counsel-org-goto~                                   | ~org-goto~                                |
| =C-c l /=                                           | ~counsel-org-goto-all~                               | ~nil~                                     |
| =C-c l A=                                           | ~org-archive-subtree~                                | ~nil~                                     |
| =C-c l e=                                           | ~org-export-dispatch~                                | ~nil~                                     |
| =C-c l f=                                           | ~org-footnote-new~                                   | ~nil~                                     |
| =C-c l h=                                           | ~org-toggle-heading~                                 | ~nil~                                     |
| =C-c l i=                                           | ~org-toggle-item~                                    | ~nil~                                     |
| =C-c l I=                                           | ~org-toggle-inline-images~                           | ~nil~                                     |
| =C-c l n=                                           | ~org-store-link~                                     | ~nil~                                     |
| =C-c l o=                                           | ~org-set-property~                                   | ~nil~                                     |
| =C-c l q=                                           | ~org-set-tags-command~                               | ~nil~                                     |
| =C-c l t=                                           | ~org-todo~                                           | ~nil~                                     |
| =C-c l T=                                           | ~org-todo-list~                                      | ~nil~                                     |
| =C-c l x=                                           | ~org-toggle-checkbox~                                | ~nil~                                     |
| =C-c l a a=                                         | ~org-attach~                                         | ~3~                                       |
| =C-c l a d=                                         | ~org-attach-delete-one~                              | ~3~                                       |
| =C-c l a D=                                         | ~org-attach-delete-all~                              | ~3~                                       |
| =C-c l a f=                                         | ~+org/find-file-in-attachments~                      | ~3~                                       |
| =C-c l a l=                                         | ~+org/attach-file-and-insert-link~                   | ~3~                                       |
| =C-c l a n=                                         | ~org-attach-new~                                     | ~3~                                       |
| =C-c l a o=                                         | ~org-attach-open~                                    | ~3~                                       |
| =C-c l a O=                                         | ~org-attach-open-in-emacs~                           | ~3~                                       |
| =C-c l a r=                                         | ~org-attach-reveal~                                  | ~3~                                       |
| =C-c l a R=                                         | ~org-attach-reveal-in-emacs~                         | ~3~                                       |
| =C-c l a u=                                         | ~org-attach-url~                                     | ~3~                                       |
| =C-c l a s=                                         | ~org-attach-set-directory~                           | ~3~                                       |
| =C-c l a S=                                         | ~org-attach-sync~                                    | ~3~                                       |
| =C-c l a c=                                         | ~org-download-screenshot~                            | ~nil~                                     |
| =C-c l a p=                                         | ~org-download-clipboard~                             | ~nil~                                     |
| =C-c l a P=                                         | ~org-download-yank~                                  | ~nil~                                     |
| =C-c l b -=                                         | ~org-table-insert-hline~                             | ~3~                                       |
| =C-c l b a=                                         | ~org-table-align~                                    | ~3~                                       |
| =C-c l b b=                                         | ~org-table-blank-field~                              | ~3~                                       |
| =C-c l b c=                                         | ~org-table-create-or-convert-from-region~            | ~3~                                       |
| =C-c l b e=                                         | ~org-table-edit-field~                               | ~3~                                       |
| =C-c l b f=                                         | ~org-table-edit-formulas~                            | ~3~                                       |
| =C-c l b h=                                         | ~org-table-field-info~                               | ~3~                                       |
| =C-c l b s=                                         | ~org-table-sort-lines~                               | ~3~                                       |
| =C-c l b r=                                         | ~org-table-recalculate~                              | ~3~                                       |
| =C-c l b R=                                         | ~org-table-recalculate-buffer-tables~                | ~3~                                       |
| =C-c l b d c=                                       | ~org-table-delete-column~                            | ~4~                                       |
| =C-c l b d r=                                       | ~org-table-kill-row~                                 | ~4~                                       |
| =C-c l b i c=                                       | ~org-table-insert-column~                            | ~4~                                       |
| =C-c l b i h=                                       | ~org-table-insert-hline~                             | ~4~                                       |
| =C-c l b i r=                                       | ~org-table-insert-row~                               | ~4~                                       |
| =C-c l b i H=                                       | ~org-table-hline-and-move~                           | ~4~                                       |
| =C-c l b t f=                                       | ~org-table-toggle-formula-debugger~                  | ~4~                                       |
| =C-c l b t o=                                       | ~org-table-toggle-coordinate-overlays~               | ~4~                                       |
| =C-c l b p=                                         | ~org-plot/gnuplot~                                   | ~nil~                                     |
| =C-c l c c=                                         | ~org-clock-cancel~                                   | ~3~                                       |
| =C-c l c d=                                         | ~org-clock-mark-default-task~                        | ~3~                                       |
| =C-c l c e=                                         | ~org-clock-modify-effort-estimate~                   | ~3~                                       |
| =C-c l c E=                                         | ~org-set-effort~                                     | ~3~                                       |
| =C-c l c g=                                         | ~org-clock-goto~                                     | ~3~                                       |
| =C-c l c G=                                         | ~(closure (t) (&rest _) (interactive) (org-clock-go~ | ~3~                                       |
| =C-c l c l=                                         | ~+org/toggle-last-clock~                             | ~3~                                       |
| =C-c l c i=                                         | ~org-clock-in~                                       | ~3~                                       |
| =C-c l c I=                                         | ~org-clock-in-last~                                  | ~3~                                       |
| =C-c l c o=                                         | ~org-clock-out~                                      | ~3~                                       |
| =C-c l c r=                                         | ~org-resolve-clocks~                                 | ~3~                                       |
| =C-c l c R=                                         | ~org-clock-report~                                   | ~3~                                       |
| =C-c l c t=                                         | ~org-evaluate-time-range~                            | ~3~                                       |
| =C-c l c ==                                         | ~org-clock-timestamps-up~                            | ~3~                                       |
| =C-c l c -=                                         | ~org-clock-timestamps-down~                          | ~3~                                       |
| =C-c l d d=                                         | ~org-deadline~                                       | ~3~                                       |
| =C-c l d s=                                         | ~org-schedule~                                       | ~3~                                       |
| =C-c l d t=                                         | ~org-time-stamp~                                     | ~3~                                       |
| =C-c l d T=                                         | ~org-time-stamp-inactive~                            | ~3~                                       |
| =C-c l g g=                                         | ~counsel-org-goto~                                   | ~org-goto~                                |
| =C-c l g G=                                         | ~counsel-org-goto-all~                               | ~nil~                                     |
| =C-c l g c=                                         | ~org-clock-goto~                                     | ~nil~                                     |
| =C-c l g C=                                         | ~(closure (t) (&rest _) (interactive) (org-clock-go~ | ~nil~                                     |
| =C-c l g i=                                         | ~org-id-goto~                                        | ~nil~                                     |
| =C-c l g r=                                         | ~org-refile-goto-last-stored~                        | ~nil~                                     |
| =C-c l g v=                                         | ~+org/goto-visible~                                  | ~nil~                                     |
| =C-c l g x=                                         | ~org-capture-goto-last-stored~                       | ~nil~                                     |
| =C-c l l c=                                         | ~org-cliplink~                                       | ~3~                                       |
| =C-c l l d=                                         | ~+org/remove-link~                                   | ~3~                                       |
| =C-c l l i=                                         | ~org-id-store-link~                                  | ~3~                                       |
| =C-c l l l=                                         | ~org-insert-link~                                    | ~3~                                       |
| =C-c l l L=                                         | ~org-insert-all-links~                               | ~3~                                       |
| =C-c l l s=                                         | ~org-store-link~                                     | ~3~                                       |
| =C-c l l S=                                         | ~org-insert-last-stored-link~                        | ~3~                                       |
| =C-c l l t=                                         | ~org-toggle-link-display~                            | ~3~                                       |
| =C-c l P a=                                         | ~org-publish-all~                                    | ~3~                                       |
| =C-c l P f=                                         | ~org-publish-current-file~                           | ~3~                                       |
| =C-c l P p=                                         | ~org-publish~                                        | ~3~                                       |
| =C-c l P P=                                         | ~org-publish-current-project~                        | ~3~                                       |
| =C-c l P s=                                         | ~org-publish-sitemap~                                | ~3~                                       |
| =C-c l r .=                                         | ~+org/refile-to-current-file~                        | ~3~                                       |
| =C-c l r c=                                         | ~+org/refile-to-running-clock~                       | ~3~                                       |
| =C-c l r l=                                         | ~+org/refile-to-last-location~                       | ~3~                                       |
| =C-c l r f=                                         | ~+org/refile-to-file~                                | ~3~                                       |
| =C-c l r o=                                         | ~+org/refile-to-other-window~                        | ~3~                                       |
| =C-c l r O=                                         | ~+org/refile-to-other-buffer~                        | ~3~                                       |
| =C-c l r v=                                         | ~+org/refile-to-visible~                             | ~3~                                       |
| =C-c l r r=                                         | ~org-refile~                                         | ~3~                                       |
| =C-c l s a=                                         | ~org-toggle-archive-tag~                             | ~3~                                       |
| =C-c l s b=                                         | ~org-tree-to-indirect-buffer~                        | ~3~                                       |
| =C-c l s d=                                         | ~org-cut-subtree~                                    | ~3~                                       |
| =C-c l s h=                                         | ~org-promote-subtree~                                | ~3~                                       |
| =C-c l s j=                                         | ~org-move-subtree-down~                              | ~3~                                       |
| =C-c l s k=                                         | ~org-move-subtree-up~                                | ~3~                                       |
| =C-c l s l=                                         | ~org-demote-subtree~                                 | ~3~                                       |
| =C-c l s n=                                         | ~org-narrow-to-subtree~                              | ~3~                                       |
| =C-c l s r=                                         | ~org-refile~                                         | ~3~                                       |
| =C-c l s s=                                         | ~org-sparse-tree~                                    | ~3~                                       |
| =C-c l s A=                                         | ~org-archive-subtree~                                | ~3~                                       |
| =C-c l s N=                                         | ~widen~                                              | ~3~                                       |
| =C-c l s S=                                         | ~org-sort~                                           | ~3~                                       |
| =C-c l p d=                                         | ~org-priority-down~                                  | ~3~                                       |
| =C-c l p p=                                         | ~org-priority~                                       | ~3~                                       |
| =C-c l p u=                                         | ~org-priority-up~                                    | ~3~                                       |
| =C-c l m b=                                         | ~org-roam-switch-to-buffer~                          | ~3~                                       |
| =C-c l m f=                                         | ~org-roam-find-file~                                 | ~3~                                       |
| =C-c l m g=                                         | ~org-roam-graph~                                     | ~3~                                       |
| =C-c l m i=                                         | ~org-roam-insert~                                    | ~3~                                       |
| =C-c l m I=                                         | ~org-roam-insert-immediate~                          | ~3~                                       |
| =C-c l m m=                                         | ~org-roam~                                           | ~3~                                       |
| =C-c l m t=                                         | ~org-roam-tag-add~                                   | ~3~                                       |
| =C-c l m T=                                         | ~org-roam-tag-delete~                                | ~3~                                       |
| =C-c l m d b=                                       | ~org-roam-dailies-find-previous-note~                | ~4~                                       |
| =C-c l m d d=                                       | ~org-roam-dailies-find-date~                         | ~4~                                       |
| =C-c l m d f=                                       | ~org-roam-dailies-find-next-note~                    | ~4~                                       |
| =C-c l m d m=                                       | ~org-roam-dailies-find-tomorrow~                     | ~4~                                       |
| =C-c l m d n=                                       | ~org-roam-dailies-capture-today~                     | ~4~                                       |
| =C-c l m d t=                                       | ~org-roam-dailies-find-today~                        | ~4~                                       |
| =C-c l m d v=                                       | ~org-roam-dailies-capture-date~                      | ~4~                                       |
| =C-c l m d y=                                       | ~org-roam-dailies-find-yesterday~                    | ~4~                                       |
| =C-c l m d .=                                       | ~org-roam-dailies-find-directory~                    | ~4~                                       |

* Smartparens-Mode-Map Keybindings
| key     | command                | previous |
|---------+------------------------+----------|
| =C-M-a= | ~sp-beginning-of-sexp~ | ~nil~    |
| =C-M-e= | ~sp-end-of-sexp~       | ~nil~    |
| =C-M-f= | ~sp-forward-sexp~      | ~nil~    |
| =C-M-b= | ~sp-backward-sexp~     | ~nil~    |
| =C-M-d= | ~sp-splice-sexp~       | ~nil~    |
| =C-M-k= | ~sp-kill-sexp~         | ~nil~    |
| =C-M-t= | ~sp-transpose-sexp~    | ~nil~    |

* Flycheck-Error-List-Mode-Map Keybindings
| key   | command                              | previous                         |
|-------+--------------------------------------+----------------------------------|
| =C-n= | ~flycheck-error-list-next-error~     | ~nil~                            |
| =C-p= | ~flycheck-error-list-previous-error~ | ~nil~                            |
| =RET= | ~flycheck-error-list-goto-error~     | ~flycheck-error-list-goto-error~ |

* Ranger-Mode-Map Keybindings
| key | command               | previous |
|-----+-----------------------+----------|
| =)= | ~dired-git-info-mode~ | ~nil~    |

* Dired-Mode-Map Keybindings
| key       | command                        | previous      |
|-----------+--------------------------------+---------------|
| =C-c C-r= | ~dired-rsync~                  | ~nil~         |
| =q=       | ~+dired/quit-all~              | ~quit-window~ |
| =C-c C-e= | ~wdired-change-to-wdired-mode~ | ~nil~         |
| =)=       | ~dired-git-info-mode~          | ~nil~         |

* Snippet-Mode-Map Keybindings
| key       | command           | previous |
|-----------+-------------------+----------|
| =C-c C-k= | ~+snippet--abort~ | ~nil~    |

* Yas-Minor-Mode-Map Keybindings
| key                                | command          | previous |
|------------------------------------+------------------+----------|
| =<remap> <yas-new-snippet>=        | ~+snippets/new~  | ~nil~    |
| =<remap> <yas-visit-snippet-file>= | ~+snippets/edit~ | ~nil~    |

* Yas-Keymap Keybindings
| key             | command                                  | previous |
|-----------------+------------------------------------------+----------|
| =C-e=           | ~+snippets/goto-end-of-field~            | ~nil~    |
| =C-a=           | ~+snippets/goto-start-of-field~          | ~nil~    |
| =<M-right>=     | ~+snippets/goto-end-of-field~            | ~nil~    |
| =<M-left>=      | ~+snippets/goto-start-of-field~          | ~nil~    |
| =<M-backspace>= | ~+snippets/delete-to-start-of-field~     | ~nil~    |
| =<backspace>=   | ~+snippets/delete-backward-char~         | ~nil~    |
| =<delete>=      | ~+snippets/delete-forward-char-or-field~ | ~nil~    |

* Emacs-Lisp-Mode-Map Keybindings
| key         | command                                   | previous |
|-------------+-------------------------------------------+----------|
| =C-c l m=   | ~macrostep-expand~                        | ~nil~    |
| =C-c l d f= | ~+emacs-lisp/edebug-instrument-defun-on~  | ~3~      |
| =C-c l d F= | ~+emacs-lisp/edebug-instrument-defun-off~ | ~3~      |
| =C-c l e b= | ~eval-buffer~                             | ~3~      |
| =C-c l e d= | ~eval-defun~                              | ~3~      |
| =C-c l e e= | ~eval-last-sexp~                          | ~3~      |
| =C-c l e r= | ~eval-region~                             | ~3~      |
| =C-c l e l= | ~load-library~                            | ~3~      |
| =C-c l g f= | ~find-function~                           | ~3~      |
| =C-c l g v= | ~find-variable~                           | ~3~      |
| =C-c l g l= | ~find-library~                            | ~3~      |

* Persp-Mode-Map Keybindings
| key                            | command                                | previous |
|--------------------------------+----------------------------------------+----------|
| =<remap> <delete-window>=      | ~+workspace/close-window-or-workspace~ | ~nil~    |
| =<remap> <evil-window-delete>= | ~+workspace/close-window-or-workspace~ | ~nil~    |

* Help-Mode-Map Keybindings
| key | command               | previous              |
|-----+-----------------------+-----------------------|
| =o= | ~link-hint-open-link~ | ~nil~                 |
| =>= | ~help-go-forward~     | ~end-of-buffer~       |
| =<= | ~help-go-back~        | ~beginning-of-buffer~ |
| =n= | ~forward-button~      | ~nil~                 |
| =p= | ~backward-button~     | ~nil~                 |

* Read-Expression-Map Keybindings
| key   | command                      | previous                     |
|-------+------------------------------+------------------------------|
| =C-s= | ~counsel-minibuffer-history~ | ~counsel-minibuffer-history~ |

* Minibuffer-Local-Isearch-Map Keybindings
| key   | command                      | previous                          |
|-------+------------------------------+-----------------------------------|
| =C-s= | ~counsel-minibuffer-history~ | ~isearch-forward-exit-minibuffer~ |

* Minibuffer-Local-Must-Match-Map Keybindings
| key   | command                      | previous                     |
|-------+------------------------------+------------------------------|
| =C-s= | ~counsel-minibuffer-history~ | ~counsel-minibuffer-history~ |

* Minibuffer-Local-Completion-Map Keybindings
| key   | command                      | previous                     |
|-------+------------------------------+------------------------------|
| =C-s= | ~counsel-minibuffer-history~ | ~counsel-minibuffer-history~ |

* Minibuffer-Local-Ns-Map Keybindings
| key   | command                      | previous                     |
|-------+------------------------------+------------------------------|
| =C-s= | ~counsel-minibuffer-history~ | ~counsel-minibuffer-history~ |

* Minibuffer-Local-Map Keybindings
| key   | command                      | previous |
|-------+------------------------------+----------|
| =C-s= | ~counsel-minibuffer-history~ | ~nil~    |

* General-Override-Mode-Map Keybindings
| key   | command                    | previous |
|-------+----------------------------+----------|
| =M-x= | ~execute-extended-command~ | ~nil~    |
| =A-x= | ~execute-extended-command~ | ~nil~    |

* Help-Map Keybindings
| key     | command                            | previous                       |
|---------+------------------------------------+--------------------------------|
| ='=     | ~describe-char~                    | ~nil~                          |
| =u=     | ~doom/help-autodefs~               | ~nil~                          |
| =E=     | ~doom/sandbox~                     | ~nil~                          |
| =M=     | ~doom/describe-active-minor-mode~  | ~nil~                          |
| =O=     | ~+lookup/online~                   | ~nil~                          |
| =T=     | ~doom/toggle-profiler~             | ~nil~                          |
| =V=     | ~doom/help-custom-variable~        | ~nil~                          |
| =W=     | ~+default/man-or-woman~            | ~nil~                          |
| =C-k=   | ~describe-key-briefly~             | ~nil~                          |
| =C-l=   | ~describe-language-environment~    | ~nil~                          |
| =RET=   | ~info-emacs-manual~                | ~view-order-manuals~           |
| =C-h=   | ~nil~                              | ~help-for-help~                |
| =r=     | ~nil~                              | ~info-emacs-manual~            |
| =r r=   | ~doom/reload~                      | ~nil~                          |
| =r t=   | ~doom/reload-theme~                | ~nil~                          |
| =r p=   | ~doom/reload-packages~             | ~nil~                          |
| =r f=   | ~doom/reload-font~                 | ~nil~                          |
| =r e=   | ~doom/reload-env~                  | ~nil~                          |
| =b=     | ~nil~                              | ~describe-bindings~            |
| =b b=   | ~describe-bindings~                | ~nil~                          |
| =b i=   | ~which-key-show-minor-mode-keymap~ | ~nil~                          |
| =b m=   | ~which-key-show-major-mode~        | ~nil~                          |
| =b t=   | ~which-key-show-top-level~         | ~nil~                          |
| =b f=   | ~which-key-show-full-keymap~       | ~nil~                          |
| =b k=   | ~which-key-show-keymap~            | ~nil~                          |
| =d=     | ~nil~                              | ~apropos-documentation~        |
| =d b=   | ~doom/report-bug~                  | ~nil~                          |
| =d c=   | ~doom/goto-private-config-file~    | ~nil~                          |
| =d C=   | ~doom/goto-private-init-file~      | ~nil~                          |
| =d d=   | ~doom-debug-mode~                  | ~nil~                          |
| =d f=   | ~doom/help-faq~                    | ~nil~                          |
| =d h=   | ~doom/help~                        | ~nil~                          |
| =d l=   | ~doom/help-search-load-path~       | ~nil~                          |
| =d L=   | ~doom/help-search-loaded-files~    | ~nil~                          |
| =d m=   | ~doom/help-modules~                | ~nil~                          |
| =d n=   | ~doom/help-news~                   | ~nil~                          |
| =d N=   | ~doom/help-search-news~            | ~nil~                          |
| =d p c= | ~doom/help-package-config~         | ~nil~                          |
| =d p d= | ~doom/goto-private-packages-file~  | ~nil~                          |
| =d p h= | ~doom/help-package-homepage~       | ~nil~                          |
| =d p p= | ~doom/help-packages~               | ~nil~                          |
| =d s=   | ~doom/help-search-headings~        | ~nil~                          |
| =d S=   | ~doom/help-search~                 | ~nil~                          |
| =d t=   | ~doom/toggle-profiler~             | ~nil~                          |
| =d u=   | ~doom/help-autodefs~               | ~nil~                          |
| =d v=   | ~doom/version~                     | ~nil~                          |
| =d x=   | ~doom/sandbox~                     | ~nil~                          |
| =a=     | ~apropos~                          | ~apropos-command~              |
| =A=     | ~apropos-documentation~            | ~nil~                          |
| =C-c=   | ~describe-coding-system~           | ~describe-copying~             |
| =F=     | ~describe-face~                    | ~Info-goto-emacs-command-node~ |
| =h=     | ~nil~                              | ~view-hello-file~              |
| =n=     | ~doom/help-news~                   | ~view-emacs-news~              |
| =t=     | ~load-theme~                       | ~help-with-tutorial~           |
| =p=     | ~doom/help-packages~               | ~finder-by-keyword~            |
| =P=     | ~find-library~                     | ~describe-package~             |

* Meow-Insert-State-Keymap Keybindings
| key   | command            | previous |
|-------+--------------------+----------|
| =C-g= | ~meow-insert-exit~ | ~nil~    |
driftcrow commented 3 years ago

上面是Generate 导出的,Doom自己用Map!宏定义的默认键没在里面,但也大部分是这种模式

;;; config/default/+emacs-bindings.el -*- lexical-binding: t; -*-

;; Sensible deafult key bindings for non-evil users
(setq doom-leader-alt-key "C-c"
      doom-localleader-alt-key "C-c l")

;; persp-mode and projectile in different prefixes
(setq persp-keymap-prefix (kbd "C-c w"))
(after! projectile
  (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map))

;;
;;; Autoloads

(autoload 'org-capture-goto-target "org-capture" nil t)

;;
;;; Leader keys

(map! :leader
      :desc "Evaluate line/region"        "e"   #'+eval/line-or-region

      (:prefix ("l" . "<localleader>")) ; bound locally
      (:prefix ("!" . "checkers"))      ; bound by flycheck

      ;;; <leader> c --- code
      (:prefix-map ("c" . "code")
       :desc "Compile"                               "c"   #'compile
       :desc "Recompile"                             "C"   #'recompile
       :desc "Jump to definition"                    "d"   #'+lookup/definition
       :desc "Jump to references"                    "D"   #'+lookup/references
       :desc "Evaluate buffer/region"                "e"   #'+eval/buffer-or-region
       :desc "Evaluate & replace region"             "E"   #'+eval/region-and-replace
       :desc "Format buffer/region"                  "f"   #'+format/region-or-buffer
       :desc "Find implementations"                  "i"   #'+lookup/implementations
       :desc "Jump to documentation"                 "k"   #'+lookup/documentation
       :desc "Send to repl"                          "s"   #'+eval/send-region-to-repl
       :desc "Find type definition"                  "t"   #'+lookup/type-definition
       :desc "Delete trailing whitespace"            "w"   #'delete-trailing-whitespace
       :desc "Delete trailing newlines"              "W"   #'doom/delete-trailing-newlines
       :desc "List errors"                           "x"   #'flymake-show-diagnostics-buffer
       (:when (featurep! :checkers syntax)
        :desc "List errors"                         "x"   #'flycheck-list-errors)
       (:when (and (featurep! :tools lsp) (not (featurep! :tools lsp +eglot)))
        :desc "LSP Code actions"                      "a"   #'lsp-execute-code-action
        :desc "LSP Organize imports"                  "o"   #'lsp-organize-imports
        :desc "LSP Rename"                            "r"   #'lsp-rename
        :desc "LSP"                                   "l"   #'+default/lsp-command-map
        (:when (featurep! :completion ivy)
         :desc "Jump to symbol in current workspace" "j"   #'lsp-ivy-workspace-symbol
         :desc "Jump to symbol in any workspace"     "J"   #'lsp-ivy-global-workspace-symbol)
        (:when (featurep! :completion helm)
         :desc "Jump to symbol in current workspace" "j"   #'helm-lsp-workspace-symbol
         :desc "Jump to symbol in any workspace"     "J"   #'helm-lsp-global-workspace-symbol)
        (:when (featurep! :ui treemacs +lsp)
         :desc "Errors list"                         "X"   #'lsp-treemacs-errors-list
         :desc "Incoming call hierarchy"             "y"   #'lsp-treemacs-call-hierarchy
         :desc "Outgoing call hierarchy"             "Y"   (cmd!! #'lsp-treemacs-call-hierarchy t)
         :desc "References tree"                     "R"   (cmd!! #'lsp-treemacs-references t)
         :desc "Symbols"                             "S"   #'lsp-treemacs-symbols))

       (:when (featurep! :tools lsp +eglot)
        :desc "LSP Execute code action"              "a" #'eglot-code-actions
        :desc "LSP Rename"                           "r" #'eglot-rename
        :desc "LSP Find declaration"                 "j" #'eglot-find-declaration))

      ;;; <leader> f --- file
      (:prefix-map ("f" . "file")
       (:when (featurep! :tools editorconfig)
        :desc "Open project editorconfig"  "c"   #'editorconfig-find-current-editorconfig)
       :desc "Copy this file"              "C"   #'doom/copy-this-file
       :desc "Find directory"              "d"   #'dired
       :desc "Delete this file"            "D"   #'doom/delete-this-file
       :desc "Find file in emacs.d"        "e"   #'doom/find-file-in-emacsd
       :desc "Browse emacs.d"              "E"   #'doom/browse-in-emacsd
       :desc "Find file"                   "f"   #'find-file
       :desc "Find file from here"         "F"   #'+default/find-file-under-here
       :desc "Locate file"                 "l"   #'locate
       :desc "Rename/move this file"       "m"   #'doom/move-this-file
       :desc "Find file in private config" "p"   #'doom/find-file-in-private-config
       :desc "Browse private config"       "P"   #'doom/open-private-config
       :desc "Recent files"                "r"   #'recentf-open-files
       :desc "Recent project files"        "R"   #'projectile-recentf
       :desc "Sudo this file"              "u"   #'doom/sudo-this-file
       :desc "Sudo find file"              "U"   #'doom/sudo-find-file
       :desc "Yank file path"              "y"   #'+default/yank-buffer-path
       :desc "Yank file path from project" "Y"   #'+default/yank-buffer-path-relative-to-project
       :desc "Open scratch buffer"         "x"   #'doom/open-scratch-buffer
       :desc "Switch to scratch buffer"    "X"   #'doom/switch-to-scratch-buffer)

      ;;; <leader> r --- remote
      (:when (featurep! :tools upload)
       (:prefix-map ("r" . "remote")
        :desc "Browse remote"              "b" #'ssh-deploy-browse-remote-base-handler
        :desc "Browse relative"            "B" #'ssh-deploy-browse-remote-handler
        :desc "Download remote"            "d" #'ssh-deploy-download-handler
        :desc "Delete local & remote"      "D" #'ssh-deploy-delete-handler
        :desc "Eshell base terminal"       "e" #'ssh-deploy-remote-terminal-eshell-base-handler
        :desc "Eshell relative terminal"   "E" #'ssh-deploy-remote-terminal-eshell-handler
        :desc "Move/rename local & remote" "m" #'ssh-deploy-rename-handler
        :desc "Open this file on remote"   "o" #'ssh-deploy-open-remote-file-handler
        :desc "Run deploy script"          "s" #'ssh-deploy-run-deploy-script-handler
        :desc "Upload local"               "u" #'ssh-deploy-upload-handler
        :desc "Upload local (force)"       "U" #'ssh-deploy-upload-handler-forced
        :desc "Diff local & remote"        "x" #'ssh-deploy-diff-handler
        :desc "Browse remote files"        "." #'ssh-deploy-browse-remote-handler
        :desc "Detect remote changes"      ">" #'ssh-deploy-remote-changes-handler))

      ;;; <leader> s --- search
      (:prefix-map ("s" . "search")
       :desc "Search project for symbol"    "." #'+default/search-project-for-symbol-at-point
       :desc "Search buffer"                "b" #'swiper
       :desc "Search all open buffers"      "B" #'swiper-all
       :desc "Search current directory"     "d" #'+default/search-cwd
       :desc "Search other directory"       "D" #'+default/search-other-cwd
       :desc "Locate file"                  "f" #'+lookup/file
       :desc "Jump to symbol"               "i" #'imenu
       :desc "Jump to visible link"         "l" #'link-hint-open-link
       :desc "Jump to link"                 "L" #'ffap-menu
       :desc "Jump to bookmark"             "m" #'bookmark-jump
       :desc "Look up online"               "o" #'+lookup/online
       :desc "Look up online (w/ prompt)"   "O" #'+lookup/online-select
       :desc "Look up in local docsets"     "k" #'+lookup/in-docsets
       :desc "Look up in all docsets"       "K" #'+lookup/in-all-docsets
       :desc "Search project"               "p" #'+default/search-project
       :desc "Search other project"         "P" #'+default/search-other-project
       :desc "Search buffer"                "s" #'+default/search-buffer
       :desc "Search buffer for thing at point" "S" #'swiper-isearch-thing-at-point
       :desc "Dictionary"                   "t" #'+lookup/dictionary-definition
       :desc "Thesaurus"                    "T" #'+lookup/synonyms)

      ;;; <leader> i --- insert
      (:prefix-map ("i" . "insert")
       :desc "Emoji"                         "e"   #'emojify-insert-emoji
       :desc "Current file name"             "f"   #'+default/insert-file-path
       :desc "Current file path"             "F"   (cmd!! #'+default/insert-file-path t)
       :desc "Snippet"                       "s"   #'yas-insert-snippet
       :desc "Unicode"                       "u"   #'insert-char
       :desc "From clipboard"                "y"   #'+default/yank-pop)

      ;;; <leader> n --- notes
      (:prefix-map ("n" . "notes")
       :desc "Search notes for symbol"        "." #'+default/search-notes-for-symbol-at-point
       :desc "Org agenda"                     "a" #'org-agenda
       (:when (featurep! :tools biblio)
        :desc "Bibliographic entries"        "b"
        (cond ((featurep! :completion ivy)   #'ivy-bibtex)
              ((featurep! :completion helm)  #'helm-bibtex)))

       :desc "Toggle last org-clock"          "c" #'+org/toggle-last-clock
       :desc "Cancel current org-clock"       "C" #'org-clock-cancel
       :desc "Open deft"                      "d" #'deft
       (:when (featurep! :lang org +noter)
        :desc "Org noter"                    "e" #'org-noter)

       :desc "Find file in notes"             "f" #'+default/find-in-notes
       :desc "Browse notes"                   "F" #'+default/browse-notes
       :desc "Org store link"                 "l" #'org-store-link
       :desc "Tags search"                    "m" #'org-tags-view
       :desc "Org capture"                    "n" #'org-capture
       :desc "Goto capture"                   "N" #'org-capture-goto-target
       :desc "Active org-clock"               "o" #'org-clock-goto
       :desc "Todo list"                      "t" #'org-todo-list
       :desc "Search notes"                   "s" #'+default/org-notes-search
       :desc "Search org agenda headlines"    "S" #'+default/org-notes-headlines
       :desc "View search"                    "v" #'org-search-view
       :desc "Org export to clipboard"        "y" #'+org/export-to-clipboard
       :desc "Org export to clipboard as RTF" "Y" #'+org/export-to-clipboard-as-rich-text
       (:when (featurep! :lang org +journal)
        (:prefix ("j" . "journal")
         :desc "New Entry"           "j" #'org-journal-new-entry
         :desc "New Scheduled Entry" "J" #'org-journal-new-scheduled-entry
         :desc "Search Forever"      "s" #'org-journal-search-forever))
       (:when (featurep! :lang org +roam)
        (:prefix ("r" . "roam")
         :desc "Switch to buffer"              "b" #'org-roam-switch-to-buffer
         :desc "Org Roam Capture"              "c" #'org-roam-capture
         :desc "Find file"                     "f" #'org-roam-find-file
         :desc "Show graph"                    "g" #'org-roam-graph
         :desc "Insert"                        "i" #'org-roam-insert
         :desc "Insert (skipping org-capture)" "I" #'org-roam-insert-immediate
         :desc "Org Roam"                      "r" #'org-roam
         :desc "Tag"                           "t" #'org-roam-tag-add
         :desc "Un-tag"                        "T" #'org-roam-tag-delete
         (:prefix ("d" . "by date")
          :desc "Arbitrary date" "d" #'org-roam-dailies-find-date
          :desc "Today"          "t" #'org-roam-dailies-find-today
          :desc "Tomorrow"       "m" #'org-roam-dailies-find-tomorrow
          :desc "Yesterday"      "y" #'org-roam-dailies-find-yesterday))))

      ;;; <leader> o --- open
      "o" nil ; we need to unbind it first as Org claims this prefix
      (:prefix-map ("o" . "open")
       :desc "Browser"            "b"  #'browse-url-of-file
       :desc "Debugger"           "d"  #'+debugger/start
       :desc "New frame"          "f"  #'make-frame
       :desc "REPL"               "r"  #'+eval/open-repl-other-window
       :desc "REPL (same window)" "R"  #'+eval/open-repl-same-window
       :desc "Dired"              "-"  #'dired-jump
       (:when (featurep! :ui neotree)
        :desc "Project sidebar"               "p" #'+neotree/open
        :desc "Find file in project sidebar"  "P" #'+neotree/find-this-file)
       (:when (featurep! :ui treemacs)
        :desc "Project sidebar"               "p" #'+treemacs/toggle
        :desc "Find file in project rsidebar" "P" #'treemacs-find-file)
       (:when (featurep! :term shell)
        :desc "Toggle shell popup"            "t" #'+shell/toggle
        :desc "Open shell here"               "T" #'+shell/here)
       (:when (featurep! :term term)
        :desc "Toggle terminal popup"         "t" #'+term/toggle
        :desc "Open terminal here"            "T" #'+term/here)
       (:when (featurep! :term vterm)
        :desc "Toggle vterm popup"            "t" #'+vterm/toggle
        :desc "Open vterm here"               "T" #'+vterm/here)
       (:when (featurep! :term eshell)
        :desc "Toggle eshell popup"           "e" #'+eshell/toggle
        :desc "Open eshell here"              "E" #'+eshell/here)
       (:when (featurep! :os macos)
        :desc "Reveal in Finder"           "o" #'+macos/reveal-in-finder
        :desc "Reveal project in Finder"   "O" #'+macos/reveal-project-in-finder
        :desc "Send to Transmit"           "u" #'+macos/send-to-transmit
        :desc "Send project to Transmit"   "U" #'+macos/send-project-to-transmit
        :desc "Send to Launchbar"          "l" #'+macos/send-to-launchbar
        :desc "Send project to Launchbar"  "L" #'+macos/send-project-to-launchbar
        :desc "Open in iTerm"              "i" #'+macos/open-in-iterm)
       (:when (featurep! :tools docker)
        :desc "Docker" "D" #'docker)
       (:when (featurep! :email mu4e)
        :desc "mu4e" "m" #'=mu4e)
       (:when (featurep! :email notmuch)
        :desc "notmuch" "m" #'=notmuch)
       (:when (featurep! :email wanderlust)
        :desc "wanderlust" "m" #'=wanderlust))

      ;;; <leader> p --- project
      (:prefix ("p" . "project")
       :desc "Search project for symbol"   "." #'+default/search-project-for-symbol-at-point
       :desc "Find file in other project"  "F" #'doom/find-file-in-other-project
       :desc "Search project"              "s" #'+default/search-project
       :desc "List project todos"          "t" #'magit-todos-list
       :desc "Open project scratch buffer" "x" #'doom/open-project-scratch-buffer
       :desc "Switch to project scratch buffer" "X" #'doom/switch-to-project-scratch-buffer
       (:when (and (featurep! :tools taskrunner)
                   (or (featurep! :completion ivy)
                       (featurep! :completion helm)))
        :desc "List project tasks"         "z" #'+taskrunner/project-tasks)
       ;; later expanded by projectile
       (:prefix ("4" . "in other window"))
       (:prefix ("5" . "in other frame")))

      ;;; <leader> q --- quit/restart
      (:prefix-map ("q" . "quit/restart")
       :desc "Restart emacs server"         "d" #'+default/restart-server
       :desc "Delete frame"                 "f" #'delete-frame
       :desc "Clear current frame"          "F" #'doom/kill-all-buffers
       :desc "Kill Emacs (and daemon)"      "K" #'save-buffers-kill-emacs
       :desc "Quit Emacs"                   "q" #'kill-emacs
       :desc "Save and quit Emacs"          "Q" #'save-buffers-kill-terminal
       :desc "Quick save current session"   "s" #'doom/quicksave-session
       :desc "Restore last session"         "l" #'doom/quickload-session
       :desc "Save session to file"         "S" #'doom/save-session
       :desc "Restore session from file"    "L" #'doom/load-session
       :desc "Restart & restore Emacs"      "r" #'doom/restart-and-restore
       :desc "Restart Emacs"                "R" #'doom/restart)

      ;;; <leader> & --- snippets
      (:prefix-map ("&" . "snippets")
       :desc "New snippet"           "n" #'yas-new-snippet
       :desc "Insert snippet"        "i" #'yas-insert-snippet
       :desc "Find global snippet"   "/" #'yas-visit-snippet-file
       :desc "Reload snippets"       "r" #'yas-reload-all
       :desc "Create Temp Template"  "c" #'aya-create
       :desc "Use Temp Template"     "e" #'aya-expand)

      ;;; <leader> t --- toggle
      (:prefix-map ("t" . "toggle")
       :desc "Big mode"                     "b" #'doom-big-font-mode
       (:when (featurep! :ui fill-column)
        :desc "Fill Column Indicator"       "c" #'+fill-column/toggle)
       :desc "Flymake"                      "f" #'flymake-mode
       :desc "Frame fullscreen"             "F" #'toggle-frame-fullscreen
       :desc "Indent style"                 "I" #'doom/toggle-indent-style
       :desc "Line numbers"                 "l" #'doom/toggle-line-numbers
       :desc "Word-wrap mode"               "w" #'+word-wrap-mode
       (:when (featurep! :checkers syntax)
        :desc "Flycheck"                   "f" #'flycheck-mode)
       (:when (featurep! :ui indent-guides)
        :desc "Indent guides"              "i" #'highlight-indent-guides-mode)
       (:when (featurep! :ui minimap)
        :desc "Minimap mode"               "m" #'minimap-mode)
       (:when (featurep! :lang org +present)
        :desc "org-tree-slide mode"        "p" #'org-tree-slide-mode)
       :desc "Read-only mode"               "r" #'read-only-mode
       (:when (and (featurep! :checkers spell) (not (featurep! :checkers spell +flyspell)))
        :desc "Spell checker"              "s" #'spell-fu-mode)
       (:when (featurep! :checkers spell +flyspell)
        :desc "Spell checker"              "s" #'flyspell-mode)
       (:when (featurep! :lang org +pomodoro)
        :desc "Pomodoro timer"             "t" #'org-pomodoro)
       (:when (featurep! :ui zen)
        :desc "Zen mode"                   "z" #'+zen/toggle
        :desc "Zen mode (fullscreen)"      "Z" #'+zen/toggle-fullscreen))

      ;;; <leader> v --- versioning
      (:prefix-map ("v" . "versioning")
       :desc "Git revert file"             "R"   #'vc-revert
       :desc "Kill link to remote"         "y"   #'+vc/browse-at-remote-kill
       :desc "Kill link to homepage"       "Y"   #'+vc/browse-at-remote-kill-homepage
       (:when (featurep! :ui vc-gutter)
        :desc "Git revert hunk"            "r"   #'git-gutter:revert-hunk
        :desc "Git stage hunk"             "s"   #'git-gutter:stage-hunk
        :desc "Git time machine"           "t"   #'git-timemachine-toggle
        :desc "Jump to next hunk"          "n"   #'git-gutter:next-hunk
        :desc "Jump to previous hunk"      "p"   #'git-gutter:previous-hunk)
       (:when (featurep! :tools magit)
        :desc "Magit dispatch"             "/"   #'magit-dispatch
        :desc "Magit file dispatch"        "."   #'magit-file-dispatch
        :desc "Forge dispatch"             "'"   #'forge-dispatch
        :desc "Magit status"               "g"   #'magit-status
        :desc "Magit status here"          "G"   #'magit-status-here
        :desc "Magit file delete"          "x"   #'magit-file-delete
        :desc "Magit blame"                "B"   #'magit-blame-addition
        :desc "Magit clone"                "C"   #'magit-clone
        :desc "Magit fetch"                "F"   #'magit-fetch
        :desc "Magit buffer log"           "L"   #'magit-log
        :desc "Git stage file"             "S"   #'magit-stage-file
        :desc "Git unstage file"           "U"   #'magit-unstage-file
        (:prefix ("f" . "find")
         :desc "Find file"                 "f"   #'magit-find-file
         :desc "Find gitconfig file"       "g"   #'magit-find-git-config-file
         :desc "Find commit"               "c"   #'magit-show-commit
         :desc "Find issue"                "i"   #'forge-visit-issue
         :desc "Find pull request"         "p"   #'forge-visit-pullreq)
        (:prefix ("o" . "open in browser")
         :desc "Browse file or region"     "."   #'+vc/browse-at-remote
         :desc "Browse homepage"           "h"   #'+vc/browse-at-remote-homepage
         :desc "Browse remote"             "r"   #'forge-browse-remote
         :desc "Browse commit"             "c"   #'forge-browse-commit
         :desc "Browse an issue"           "i"   #'forge-browse-issue
         :desc "Browse a pull request"     "p"   #'forge-browse-pullreq
         :desc "Browse issues"             "I"   #'forge-browse-issues
         :desc "Browse pull requests"      "P"   #'forge-browse-pullreqs)
        (:prefix ("l" . "list")
         (:when (featurep! :tools gist)
          :desc "List gists"               "g"   #'gist-list)
         :desc "List repositories"         "r"   #'magit-list-repositories
         :desc "List submodules"           "s"   #'magit-list-submodules
         :desc "List issues"               "i"   #'forge-list-issues
         :desc "List pull requests"        "p"   #'forge-list-pullreqs
         :desc "List notifications"        "n"   #'forge-list-notifications)
        (:prefix ("c" . "create")
         :desc "Initialize repo"           "r"   #'magit-init
         :desc "Clone repo"                "R"   #'magit-clone
         :desc "Commit"                    "c"   #'magit-commit-create
         :desc "Fixup"                     "f"   #'magit-commit-fixup
         :desc "Issue"                     "i"   #'forge-create-issue
         :desc "Pull request"              "p"   #'forge-create-pullreq)))

      ;;; <leader> w --- workspaces/windows
      (:prefix-map ("w" . "workspaces/windows")
       (:when (featurep! :ui workspaces)
        :desc "Display workspaces"           "d" #'+workspace/display
        :desc "Rename workspace"             "r" #'+workspace/rename
        :desc "Create workspace"             "c" #'+workspace/new
        :desc "Delete workspace"             "k" #'+workspace/delete
        :desc "Save workspace"               "S" #'+workspace/save
        :desc "Switch to other workspace"    "o" #'+workspace/other
        :desc "Switch to left workspace"     "p" #'+workspace/switch-left
        :desc "Switch to right workspace"    "n" #'+workspace/switch-right
        :desc "Switch to"                    "w" #'+workspace/switch-to
        :desc "Switch to workspace 1"        "1" #'+workspace/switch-to-0
        :desc "Switch to workspace 2"        "2" #'+workspace/switch-to-1
        :desc "Switch to workspace 3"        "3" #'+workspace/switch-to-2
        :desc "Switch to workspace 4"        "4" #'+workspace/switch-to-3
        :desc "Switch to workspace 5"        "5" #'+workspace/switch-to-4
        :desc "Switch to workspace 6"        "6" #'+workspace/switch-to-5
        :desc "Switch to workspace 7"        "7" #'+workspace/switch-to-6
        :desc "Switch to workspace 8"        "8" #'+workspace/switch-to-7
        :desc "Switch to workspace 9"        "9" #'+workspace/switch-to-8
        :desc "Switch to last workspace"     "0" #'+workspace/switch-to-final)
       :desc "Autosave session"             "a" #'doom/quicksave-session
       :desc "Save session"                 "s" #'doom/save-session
       :desc "Load session"                 "l" #'doom/load-session
       :desc "Load last autosaved session"  "L" #'doom/quickload-session
       :desc "Undo window config"           "u" #'winner-undo
       :desc "Redo window config"           "U" #'winner-redo)

      ;;; <leader> m --- multiple cursors
      (:when (featurep! :editor multiple-cursors)
       (:prefix-map ("m" . "multiple-cursors")
        :desc "Edit lines"         "l"         #'mc/edit-lines
        :desc "Mark next"          "n"         #'mc/mark-next-like-this
        :desc "Unmark next"        "N"         #'mc/unmark-next-like-this
        :desc "Mark previous"      "p"         #'mc/mark-previous-like-this
        :desc "Unmark previous"    "P"         #'mc/unmark-previous-like-this
        :desc "Mark all"           "t"         #'mc/mark-all-like-this
        :desc "Mark all DWIM"      "m"         #'mc/mark-all-like-this-dwim
        :desc "Edit line endings"  "e"         #'mc/edit-ends-of-lines
        :desc "Edit line starts"   "a"         #'mc/edit-beginnings-of-lines
        :desc "Mark tag"           "s"         #'mc/mark-sgml-tag-pair
        :desc "Mark in defun"      "d"         #'mc/mark-all-like-this-in-defun
        :desc "Add cursor w/mouse" "<mouse-1>" #'mc/add-cursor-on-click))

      ;; APPs
      ;;; <leader> M --- mu4e
      (:when (featurep! :email mu4e)
       (:prefix-map ("M" . "mu4e")
        :desc "Open email app" "M" #'=mu4e
        :desc "Compose email"  "c" #'+mu4e/compose))

      ;;; <leader> I --- IRC
      (:when (featurep! :app irc)
       (:prefix-map ("I" . "irc")
        :desc "Open irc app"       "I" #'=irc
        :desc "Next unread buffer" "a" #'tracking-next-buffer
        :desc "Quit irc"           "q" #'+irc/quit
        :desc "Reconnect all"      "r" #'circe-reconnect-all
        :desc "Send message"       "s" #'+irc/send-message
        (:when (featurep! :completion ivy)
         :desc "Jump to channel"  "j" #'+irc/ivy-jump-to-channel)))

      ;;; <leader> T --- twitter
      (:when (featurep! :app twitter)
       (:prefix-map ("T" . "twitter")
        :desc "Open twitter app" "T" #'=twitter
        :desc "Quit twitter"     "q" #'+twitter/quit
        :desc "Rerender twits"   "r" #'+twitter/rerender-all
        :desc "Ace link"         "l" #'+twitter/ace-link)))

;;
;;; Global & plugin keybinds

(map! "C-'" #'imenu

      ;;; Text scaling
      "M-+" #'doom/reset-font-size
      "M-=" #'doom/increase-font-size
      "M--" #'doom/decrease-font-size

      ;;; search
      (:when (featurep! :completion ivy)
        "C-S-s"        #'swiper
        "C-S-r"        #'ivy-resume)
      (:when (featurep! :completion helm)
        "C-S-s"        #'swiper-helm
        "C-S-r"        #'helm-resume)

      ;;; objed
      (:when (featurep! :editor objed +manual)
        "M-SPC"     #'objed-activate)

      ;;; buffer management
      "C-x b"       #'switch-to-buffer
      "C-x 4 b"     #'switch-to-buffer-other-window
      (:when (featurep! :ui workspaces)
        "C-x b"       #'persp-switch-to-buffer
        "C-x B"       #'switch-to-buffer
        "C-x 4 B"     #'switch-to-buffer-other-window
        (:when (featurep! :completion ivy)
          "C-x 4 b"   #'+ivy/switch-workspace-buffer-other-window))
      "C-x C-b"     #'ibuffer
      "C-x K"       #'doom/kill-this-buffer-in-all-windows

      ;;; company-mode
      "C-;" #'+company/complete
      (:after company
        :map company-active-map
        "C-o"        #'company-search-kill-others
        "C-n"        #'company-select-next
        "C-p"        #'company-select-previous
        "C-h"        #'company-quickhelp-manual-begin
        "C-S-h"      #'company-show-doc-buffer
        "C-s"        #'company-search-candidates
        "M-s"        #'company-filter-candidates
        [C-tab]      #'company-complete-common-or-cycle
        [tab]        #'company-complete-common-or-cycle
        [backtab]    #'company-select-previous
        "C-RET"      #'counsel-company
        :map company-search-map
        "C-n"        #'company-search-repeat-forward
        "C-p"        #'company-search-repeat-backward
        "C-s"        (cmd! (company-search-abort) (company-filter-candidates)))

      ;;; ein notebooks
      (:after ein:notebook-multilang
        :map ein:notebook-multilang-mode-map
        "C-c h" #'+ein/hydra/body)

      ;;; expand-region
      "C-="  #'er/expand-region
      "C--"  #'er/contract-region

      ;;; flycheck
      (:after flycheck
        :map flycheck-error-list-mode-map
        "C-n" #'flycheck-error-list-next-error
        "C-p" #'flycheck-error-list-previous-error
        "RET" #'flycheck-error-list-goto-error)

      ;;; help and info
      (:after help-mode
        :map help-mode-map
        "o" #'link-hint-open-link
        ">" #'help-go-forward
        "<" #'help-go-back
        "n" #'forward-button
        "p" #'backward-button)
      (:after helpful
        :map helpful-mode-map
        "o" #'link-hint-open-link)
      (:after apropos
        :map apropos-mode-map
        "o" #'link-hint-open-link
        "n" #'forward-button
        "p" #'backward-button)
      (:after info
        :map Info-mode-map
        "o" #'link-hint-open-link)

      ;;; ivy & counsel
      (:when (featurep! :completion ivy)
        (:after ivy
          :map ivy-minibuffer-map
          "TAB"   #'ivy-alt-done
          "C-g"   #'keyboard-escape-quit)
        (:after counsel
          :map counsel-ag-map
          "C-SPC" #'ivy-call-and-recenter ; preview
          "M-RET" #'+ivy/git-grep-other-window-action)
        "C-M-y"   #'counsel-yank-pop)

      ;;; neotree
      (:when (featurep! :ui neotree)
        "<f9>"    #'+neotree/open
        "<C-f9>"  #'+neotree/find-this-file
        (:after neotree
          :map neotree-mode-map
          "q"     #'neotree-hide
          "RET"   #'neotree-enter
          "SPC"   #'neotree-quick-look
          "v"     #'neotree-enter-vertical-split
          "s"     #'neotree-enter-horizontal-split
          "c"     #'neotree-create-node
          "D"     #'neotree-delete-node
          "g"     #'neotree-refresh
          "r"     #'neotree-rename-node
          "R"     #'neotree-refresh
          "h"     #'+neotree/collapse-or-up
          "l"     #'+neotree/expand-or-open
          "n"     #'neotree-next-line
          "p"     #'neotree-previous-line
          "N"     #'neotree-select-next-sibling-node
          "P"     #'neotree-select-previous-sibling-node))

      ;;; popups
      (:when (featurep! :ui popup)
        "C-x p"   #'+popup/other
        "C-`"     #'+popup/toggle
        "C-~"     #'+popup/raise)

      ;;; smartparens
      (:after smartparens
        :map smartparens-mode-map
        "C-M-a"     #'sp-beginning-of-sexp
        "C-M-e"     #'sp-end-of-sexp
        "C-M-f"     #'sp-forward-sexp
        "C-M-b"     #'sp-backward-sexp
        "C-M-d"     #'sp-splice-sexp
        "C-M-k"     #'sp-kill-sexp
        "C-M-t"     #'sp-transpose-sexp)

      ;;; treemacs
      (:when (featurep! :ui treemacs)
        "<f9>"   #'+treemacs/toggle
        "<C-f9>" #'treemacs-find-file))

(map! :leader
      (:when (featurep! :editor fold)
       (:prefix ("C-f" . "fold")
        "C-d"     #'vimish-fold-delete
        "C-a C-d" #'vimish-fold-delete-all
        "C-f"     #'+fold/toggle
        "C-a C-f" #'+fold/close-all
        "C-u"     #'+fold/open
        "C-a C-u" #'+fold/open-all)))
DogLooksGood commented 3 years ago

比如说这个按键,C-c l c g

如果没有 C-c C-l 的话就是 SPC c l c g,或是按你提到的将 C-c l 绑定给 SPC l. 从 doom 设计的按键来看,他应该不考虑有 C-c C-l 的情况,因为像这样多个 Ctrl 的按键是没有办法和 leader keymap 一致的。

driftcrow commented 3 years ago

doom 和spacemacs 类似,开始的时候是主要优先用Evil模式做操作的,所以C-c C-l的情况不多,但这种一般也是高频操作,不需要绑定leader keymap,直接使用还快些。但是像 C-c l C-yC-c b c C-y 这种模式还是很多的

DogLooksGood commented 3 years ago

C-c l C-y 我觉得默认的 emcas 中没有这种风格的快捷键。从没有修饰键的位置开始,后面的按键都不会有修饰键了,所以像 god-mode 会有 sticky literal prefix 一说,按 SPC 最多只需要一次。

driftcrow commented 3 years ago

嗯,Doom确实很少用这种方式。先搁置吧

driftcrow commented 2 years ago

记录一下:

因为有点不太习惯KEYPAD模式,主要是用惯了Doom的Key绑定不太想增加记忆成本。而且在我的doom配置里一直个的问题没解决就是进入KEYPAD模式后要按两次C-g才能退出keypad模式到normal模式。另外KEYPAD的帮助显示和which-key有差异,个人心理感觉似乎还有一点点的迟滞感。所以还是想将meow-leader-keymap 绑定成前缀键的模式。网上找了下代码满足了自己的需求,目前没有使用KEYPAD模式。

 (defun simulate-key-press (key)
  "Pretend that KEY was pressed.
KEY must be given in `kbd' notation."
  `(lambda () (interactive)
     (setq prefix-arg current-prefix-arg)
     (setq unread-command-events (listify-key-sequence (read-kbd-macro ,key)))))

(define-key meow-leader-keymap (kbd "x") (simulate-key-press "C-x"))
(define-key meow-leader-keymap (kbd "h") (simulate-key-press "C-h"))
(define-key meow-leader-keymap (kbd "v") (simulate-key-press (concat doom-leader-alt-key " v")))
(define-key meow-leader-keymap (kbd "n") (simulate-key-press (concat doom-leader-alt-key " n")))
(define-key meow-leader-keymap (kbd "f") (simulate-key-press (concat doom-leader-alt-key " f")))
(define-key meow-leader-keymap (kbd "b") (simulate-key-press (concat doom-leader-alt-key " b")))
(define-key meow-leader-keymap (kbd "p") (simulate-key-press (concat doom-leader-alt-key " p")))
(define-key meow-leader-keymap (kbd "w") (simulate-key-press (concat doom-leader-alt-key " w")))
(define-key meow-leader-keymap (kbd "q") (simulate-key-press (concat doom-leader-alt-key " q")))
(define-key meow-leader-keymap (kbd "o") (simulate-key-press (concat doom-leader-alt-key " o")))
(define-key meow-leader-keymap (kbd "t") (simulate-key-press (concat doom-leader-alt-key " t")))
(define-key meow-leader-keymap (kbd "s") (simulate-key-press (concat doom-leader-alt-key " s")))

simulate-key 在多按键前缀时which-key好像有点显示不及时,调整了下时间,基本解决: (setq which-key-idle-delay 0.05 which-key-idle-secondary-delay 0.5 )

driftcrow commented 2 years ago

这里也更正下,这下完美适应

(setq which-key-show-transient-maps t)
(setq meow-use-keypad-when-execute-kbd nil)

(meow-leader-define-key
 '("x" . "C-x")
 '("h" . "C-h")
 (cons "v"  (concat doom-leader-alt-key " v"))
 (cons "p"  (concat doom-leader-alt-key " p"))
 (cons "f"  (concat doom-leader-alt-key " f"))
 (cons "s"  (concat doom-leader-alt-key " s"))
 (cons "o"  (concat doom-leader-alt-key " o"))
 (cons "b"  (concat doom-leader-alt-key " b"))
 (cons "w"  (concat doom-leader-alt-key " w"))
 (cons "q"  (concat doom-leader-alt-key " q"))
 (cons "n"  (concat doom-leader-alt-key " n"))
 (cons "t"  (concat doom-leader-alt-key " t"))
 (cons "t"  (concat doom-leader-alt-key " t"))
)
drcxd commented 1 year ago

我也有类似的问题,看了上面的讨论,我大概描述一下我的问题: 对于 C-c C-v t 这个快捷键,KEYPAD 的按键序列是 SPC c v t,这确实很方便,但是后两个键,v t 是否有加 C- 前缀不一致。这样增加了记忆 Emacs 原生快捷键的成本,即要区分有没有C-前缀。 我是可以接受后续的按键默认不加C-c前缀的,即 C-c C-v t 在 KEYPAD 中需要按 SPC c SPC v t,这样我很清楚对应的 Emacs 原生按键是什么。 能否请你增加一个选项,控制 KEYPAD 后续按键是否默认增加 C- 前缀?

DogLooksGood commented 1 year ago

现在的 KEYPAD 实现比之前要完善一些了。KEYPAD 本身是一个 mode, 进入这个 mode 的按键是 NORMAL/MOTION 下的 SPC. 进入 KEYPAD 之后就会应用 KEYPAD 自己的规则。按键并不是 SPC c v t => C-c C-v t ,而是 SPC 进入 KEYPAD,之后 c v t => C-c C-v t.

drcxd commented 1 year ago

我的问题并不在那里,关键是目前 KEYPAD 的按键序列无法确定的转换为 Emacs 原生按键序列。即使是按你所说的去理解,我依然不能仅通过 c v t 这个序列,知道我执行的是 C-c C-v C-t 还是 C-c C-v t 或者是 C-c v t

如果我要在 KEYPAD 使用原生按键 C-c C-v t 对应的命令,我需要首先确认 C-c C-v C-t 这个命令不存在,这样我才能使用 SPC c v t 这个序列。而在我已知一个 KEYPAD 序列 SPC c v t 时,我完全不可能知道其原生快捷键是 C-c v t 还是 C-c C-v t 还是 C-c C-v C-t

现在的方案也有它的优点,上面说的只是我个人的偏好,我希望能有一个选项让用户自行选择。也许,我试用了那种方案后,才会发现你的默认方案更优。

不管怎样,meow是我目前用过的最舒服的输入方案。感谢你的贡献!

DogLooksGood commented 1 year ago

标准的 C-c C-v t 应该是 c v SPC t,只是你在知道 C-c C-v C-t 不存在的时候,可以省略这个 SPC.