From 644f96305baec504271335e6c74d5b2127ed1c90 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Mon, 18 Oct 2021 17:31:45 +0200 Subject: [PATCH] [Emacs] Add iedit --- org/config/emacs.org | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/org/config/emacs.org b/org/config/emacs.org index 3c8a61e..a4e4aaf 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -2226,6 +2226,41 @@ enough for me. :straight (:build t)) #+end_src +*** Iedit +:PROPERTIES: +:CUSTOM_ID: Packages-Configuration-Editing-Iedit-eb98g8q0p8j0 +:END: +Iedit is a powerful text editing tool that can be used to refactor +code through the edition of multiple regions at once, be it in a +region or in a whole buffer. +#+begin_src emacs-lisp +(use-package iedit + :defer t + :straight (:build t) + :general + (:states 'normal + :prefix "SPC" + "r" '(nil :which-key "refactor") + "ri" #'iedit-mode)) +#+end_src + +Since I’m using evil, I’ll also use a compatibility package that adds +states for iedit. +#+begin_src emacs-lisp +(use-package evil-iedit-state + :after iedit + :defer t + :straight (:build t) + :commands (evil-iedit-state evil-iedit-state/iedit-mode) + :init + (setq iedit-curent-symbol-default t + iedit-only-at-symbol-boundaries t + iedit-toggle-key-default nil) + :general + (:keymaps 'evil-iedit-state-map + "SPC" nil)) +#+end_src + *** Parinfer :PROPERTIES: :CUSTOM_ID: Packages-Configuration-Editing-Parinfermxy1fl6184j0