We recently introduced basic text replacement, but it is easy to make things a bit snazzier. You can preview the replacement by installing the anzu package, and then adding the following to your emacs config file:
(require 'anzu) (global-anzu-mode) (global-set-key (kbd "M-%") 'anzu-query-replace) (global-set-key (kbd "C-M-%") 'anzu-query-replace-regexp)
This is illustrated in the example below from my post on renaming multiple files in dired – note how when I replace “foo” with “bar” you see the replacement text previewed next to the original text
If you use my recommended setup, prelude, this behaviour is the default,so you shouldn’t need to do anything.