From: Amin Bandali Date: Thu, 23 Aug 2018 02:44:15 +0000 (-0400) Subject: [emacs] further evil-related enhancements X-Git-Url: https://git.shemshak.org/~bandali/configs/commitdiff_plain/6f4c133d3c97853e260b2ef6e3d17e95089ea1ed?ds=inline;hp=6578a877a01693dcdd1e87b0ed4ba65081f26fe7 [emacs] further evil-related enhancements --- diff --git a/.gitmodules b/.gitmodules index c5bfcc0..555302a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,6 +22,9 @@ [submodule "company"] path = lib/company url = git@github.com:company-mode/company-mode.git +[submodule "counsel-notmuch"] + path = lib/counsel-notmuch + url = git@github.com:fuxialexander/counsel-notmuch.git [submodule "crux"] path = lib/crux url = git@github.com:bbatsov/crux.git @@ -62,9 +65,15 @@ [submodule "evil"] path = lib/evil url = git@github.com:emacs-evil/evil.git +[submodule "evil-collection"] + path = lib/evil-collection + url = git@github.com:emacs-evil/evil-collection.git [submodule "evil-escape"] path = lib/evil-escape url = git@github.com:syl20bnr/evil-escape.git +[submodule "evil-magit"] + path = lib/evil-magit + url = git@github.com:emacs-evil/evil-magit.git [submodule "evil-org"] path = lib/evil-org url = git@github.com:Somelauw/evil-org-mode.git 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)) diff --git a/lib/counsel-notmuch b/lib/counsel-notmuch new file mode 160000 index 0000000..f4c864e --- /dev/null +++ b/lib/counsel-notmuch @@ -0,0 +1 @@ +Subproject commit f4c864eca400abe0bb7420bcee80f2f8259ca0ff diff --git a/lib/evil-collection b/lib/evil-collection new file mode 160000 index 0000000..b248dfa --- /dev/null +++ b/lib/evil-collection @@ -0,0 +1 @@ +Subproject commit b248dfae6175df61b3ddf8082d812e28b694b0bd diff --git a/lib/evil-magit b/lib/evil-magit new file mode 160000 index 0000000..9e2275b --- /dev/null +++ b/lib/evil-magit @@ -0,0 +1 @@ +Subproject commit 9e2275b14807168451e10b93d69e420e435f21ef