From c0fb5a01f41a5a80634489954d327368545c53b7 Mon Sep 17 00:00:00 2001 From: Tianshu Wang Date: Fri, 11 Oct 2024 16:26:59 +0800 Subject: [PATCH] Add keybindings for org-capture --- modes/org/evil-collection-org.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modes/org/evil-collection-org.el b/modes/org/evil-collection-org.el index 61aec025..22db0124 100644 --- a/modes/org/evil-collection-org.el +++ b/modes/org/evil-collection-org.el @@ -31,13 +31,17 @@ ;;; Code: (require 'evil-collection) -(defconst evil-collection-org-maps '(org-mode-map)) +(defconst evil-collection-org-maps '(org-mode-map + org-capture-mode-map)) (declare-function org-shifttab "org") (declare-function org-backward-paragraph "org") (declare-function org-forward-paragraph "org") (declare-function org-backward-sentence "org") (declare-function org-forward-sentence "org") +(declare-function org-capture-finalize "org-capture") +(declare-function org-capture-kill "org-capture") +(declare-function org-capture-refile "org-capture") ;;;###autoload (defun evil-collection-org-setup () @@ -50,7 +54,12 @@ "{" 'org-backward-paragraph "}" 'org-forward-paragraph "(" 'org-backward-sentence - ")" 'org-forward-sentence)) + ")" 'org-forward-sentence) + + (evil-collection-define-key 'normal 'org-capture-mode-map + "ZZ" 'org-capture-finalize + "ZQ" 'org-capture-kill + "ZR" 'org-capture-refile)) (provide 'evil-collection-org) ;;; evil-collection-org.el ends here