From 8b9470d7c283fc30937b39aafbf1a2c0b76b5201 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 31 Mar 2021 12:46:14 -0500 Subject: Add plugins --- init.el | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 1ba61dc..5da5a38 100644 --- a/init.el +++ b/init.el @@ -358,18 +358,57 @@ (setup (:straight beginend) (beginend-global-mode +1)) +;;;; MWIM +(setup (:straight mwim) + (:acdw/map "C-a" mwim-beginning + "C-e" mwim-end)) + ;;;; Expand-region (setup (:straight expand-region) (:acdw/map "C-=" er/expand-region)) ;;;; CRUX (setup (:straight crux) - (:with-map acdw/map - (:bind "M-o" crux-other-window-or-switch-buffer) - (:bind "C-a" crux-move-beginning-of-line) - (:bind "C-k" crux-kill-and-join-forward)) + (:acdw/map "M-o" crux-other-window-or-switch-buffer + "C-k" crux-kill-and-join-forward) (crux-reopen-as-root-mode +1)) +;;;; AVY ... & friends +(setup (:straight avy) + (:acdw/map "C-:" avy-goto-char + "C-'" avy-goto-char-timer + "M-g f" avy-goto-line + "M-g w" avy-goto-word-1 + "C-c C-j" avy-resume) + (eval-after-load "isearch" + '(define-key isearch-mode-map (kbd "C-'") #'avy-isearch))) + +;;;;; zzz-to-char +(setup (:straight zzz-to-char) + (defun acdw/zzz-up-to-char (prefix) + "Call `zzz-up-to-char', unless issued a PREFIX, in which case +call `zzz-to-char'." + (interactive "P") + (if prefix + (call-interactively #'zzz-to-char) + (call-interactively #'zzz-up-to-char))) + (:acdw/map "M-z" acdw/zzz-up-to-char)) + +;;;; anzu +(setup (:straight anzu) + (:option anzu-replace-to-string-separator " → " + anzu-cons-mode-line-p nil) + (add-to-list 'mode-line-misc-info '(:eval (anzu--update-mode-line))) + + (:acdw/map [remap query-replace] anzu-query-replace + [remap query-replace-regexp] anzu-query-replace-regexp) + (:with-map isearch-mode-map + (:bind [remap isearch-query-replace] anzu-isearch-query-replace + [remap isearch-query-replace-regexp] + anzu-isearch-query-replace-regexp)) + + (global-anzu-mode +1)) + ;;; Functionality ;;;; Async -- cgit 1.4.1-21-gabe81