mezi
1
我想把doom默认的按键当中修改几个按键,尽可能保留原有默认按键,刚开始入坑,学习中,请各路大神指摘。
下面的按键修改不成功,但不知道问题在哪里。general 和evil的文档看了一边,找不出问题原因。
;;
;; unbind the keys for customizing
(unmap! 'm "," "z .")
(unmap! 'n "SPC :" "SPC ~" "SPC .")
;;
;; unbind the commands
(unmap! 'm :with 'ignore [remap swiper])
;;
;;
(map! :m "zs" #'swiper
:m "zc" #'org-capture)
;;
;; <leader>
(map! :leader
:desc "M-x" "SPC" #'execute-extended-command
:desc "Toggle last popup" "." #'+popup/toggle
(:prefix ("f" "file")
:desc "Find file" "f" #'find-file))
mezi
3
maskray 和fuxialexander的配置,我都翻了好几遍了,特别是maskray的。
你需要绑定在normal模式
(map! :nm "zs" #'swiper
:nm "zc" #'org-capture)
1 个赞
mezi
10
https://github.com/noctuid/general.el/issues/57
貌似,doom中要bind默认按键,直接绑定就好了。不用清除,具体原因还没有调查。以下是我修改后的:
;;
;; unbind the keys for customizing
;; (unmap! 'n "SPC :" "SPC ~" "SPC .")
(unmap! 'm "," "z .")
;; (general-define-key :states '(normal motion visual) "SPC :" nil)
;;
;; unbind the commands
;; (unmap! 'n :with 'ignore
;; [remap swiper]
;; [remap counsel-M-x])
(map! :nmv "zs" #'swiper
:m "z-" #'evil-close-fold
:nm "zc" #'org-capture)
;;
;; <leader>
(map! :leader
:desc "M-x" "SPC" #'execute-extended-command
:desc "Toggle last popup" "." #'+popup/toggle
":" nil
"~" nil
(:prefix ("f" "file")
:desc "Find file" "f" #'find-file)
(:prefix ("/" . "search") "b" nil ))