Post #1454405
2026-04-17 06:42 UTC
#emacs nerds, so i know the project-level find/replace workflow: consult-ripgrep, in results buffer change to wgrep-mode, then use iedit-mode to mark all instances of something, edit them, apply, save.
but i wonder how to do this with things that run over multiple lines, like e.g. HTML? i changed consult-ripgrep-args to make it display 2 lines of context around matches in the results buffer, but i can't edit those context lines as normal.
Replies (3)
-
@wiersdorf@fosstodon.org 2026-04-17 06:51
@mousebot@todon.nl This is where I’d use a keyboard macro.
-
@isamert@mastodon.social 2026-04-17 07:16
@mousebot@todon.nl deadgrep can do that and you can also change the context dynamically in the results buffer too
-
@kickingvegas@sfba.social 2026-04-17 07:51
@mousebot@todon.nl C-q C-j to insert a linefeed for interactive input is the only way I know how to deal with multi-line search and replace in Emacs.