Skip to main content
2 of 2
added 599 characters in body
chen bin
  • 5k
  • 21
  • 36

narrow the region you want to edit (https://www.gnu.org/software/emacs/manual/html_node/emacs/Narrowing.html). Then use iedit as usual

You can also iedit-toggle-selection to toggle certain selections before text replacement.

You can navigate between selections. See code from iedit-lib.el,

(defvar iedit-lib-keymap
  (let ((map (make-sparse-keymap)))
    ;; Default key bindings
    (define-key map (kbd "TAB") 'iedit-next-occurrence)
    (define-key map (kbd "<tab>") 'iedit-next-occurrence)
    (define-key map (kbd "<S-tab>") 'iedit-prev-occurrence)
    (define-key map (kbd "<S-iso-lefttab>") 'iedit-prev-occurrence)
    (define-key map (kbd "<backtab>") 'iedit-prev-occurrence)
    (define-key map (kbd "C-'") 'iedit-toggle-unmatched-lines-visible)
    map)
chen bin
  • 5k
  • 21
  • 36