From 6f4c133d3c97853e260b2ef6e3d17e95089ea1ed Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Wed, 22 Aug 2018 22:44:15 -0400 Subject: [emacs] further evil-related enhancements --- init.org | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) (limited to 'init.org') diff --git a/init.org b/init.org index 6aebbf1..c7b2c83 100644 --- a/init.org +++ b/init.org @@ -640,11 +640,20 @@ customizing it. (use-package evil :demand t :hook (view-mode . evil-motion-state) + :init + (setq evil-want-integration nil) :config (evil-mode 1) (general-swap-key nil '(normal motion) ";" ":") (setq evil-want-visual-char-semi-exclusive t)) #+end_src +#+begin_src emacs-lisp +(use-package evil-collection + :after evil + :config + (evil-collection-init)) +#+end_src + #+begin_src emacs-lisp (use-package evil-escape :demand t @@ -662,6 +671,13 @@ customizing it. (push #'minibufferp evil-escape-inhibit-functions)) #+end_src +#+begin_src emacs-lisp +(use-package evil-magit + :after magit + :config + (evil-set-initial-state 'git-commit-mode 'insert)) +#+end_src + #+begin_src emacs-lisp (use-package evil-org :hook (org-mode . evil-org-mode) @@ -689,6 +705,8 @@ customizing it. #+begin_src emacs-lisp (amin--leader-keys + "/" '(:ignore t :wk "search") + "B" '(:ignore t :wk "Borg") "BA" 'borg-activate "Ba" 'borg-assimilate @@ -817,7 +835,8 @@ There's no way I could top that, so I won't attempt to. #+begin_src emacs-lisp (use-package swiper - :general (:states 'normal "/" 'swiper) + :general (:states '(normal motion) "/" 'swiper) + (amin--leader-keys "//" 'swiper) :bind (([remap isearch-forward] . swiper) ([remap isearch-backward] . swiper))) #+end_src @@ -1234,21 +1253,6 @@ Emacs package that displays available keybindings in popup See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]]. -#+begin_src emacs-lisp -(defun amin/notmuch () - "Delete other windows, then launch `notmuch'." - (interactive) - (require 'notmuch) - (delete-other-windows) - (notmuch)) - -;; (map! -;; :leader -;; :desc "notmuch" :n "m" #'amin/notmuch -;; (:desc "search" :prefix "/" -;; :desc "notmuch" :n "m" #'counsel-notmuch)) -#+end_src - #+begin_src emacs-lisp (defvar amin-maildir "~/mail") @@ -1289,8 +1293,15 @@ See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]]. (setq mml-secure-openpgp-encrypt-to-self t mml-secure-openpgp-sign-with-sender t)) +(defun amin/notmuch () + "Delete other windows, then launch `notmuch'." + (interactive) + (delete-other-windows) + (notmuch)) + (use-package notmuch :general (amin--leader-keys "m" 'amin/notmuch) + :commands notmuch :config (setq notmuch-hello-sections '(notmuch-hello-insert-header @@ -1377,8 +1388,8 @@ See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]]. (notmuch-tree-archive-thread)))) ) -;; (use-package counsel-notmuch -;; :commands counsel-notmuch) +(use-package counsel-notmuch + :general (amin--leader-keys "/m" 'counsel-notmuch)) (after! notmuch-crypto (setq notmuch-crypto-process-mime t)) -- cgit v1.2.3-60-g2f50