Om Prakash Singh has a very nice post on the Emacs search and replace commands. We all know the commands for forward and reverse incremental search (【Ctrl+s】 and 【Ctrl+r】), query-replace
(【Meta+%】), and query-replace-regexp
(【Ctrl+Meta+%】) but each of these commands has a plethora of options that you can invoke and there are other, specialized search and replace commands that are less often used.
All of these commands and options offer very fine grained searching and replacement but they’re really hard—at least for me—to remember. Utilities like guide-key
and which-key
or perhaps a hydra can help a bit but a summary like Singh’s is useful and worth bookmarking for those occasions when you need it.
You should read through his post just to get an idea of what’s available. There’s a lot of functionality that you may not know about.