For a very long time I’ve been using swiper-isearch
in place of the default isearch
because I like the way it lists the results in the minibuffer, lets you scroll through them, and pick the result you want On the downside, it’s not always clear which target you’re looking at when you have long lines, which I often do because I write with visual-line-mode
enabled, but I’ve stuck with it out of habit.
Now Bozhidar Batsov has come along to blow up my comfortable status quo. It turns out that isearch
is way more powerful than most of us knew. It’s not a secret. All this “hidden” power is described right there in the docstring. It’s incredible that it’s not better known.
There are a bunch of commands to add or delete characters or words to or from the search string, often from whatever happens to be at point. There are also several toggles such as case sensitivity, whether or not to search for invisible text, regular expression mode, and others.
Finally, you can edit the search string in the minibuffer, scroll through a history of the last 16 search strings, and, as mbork told us the other day, you can search for the symbol at point. There’s more so take a look at Batsov’s post or the docstring. As Batsov reminds us, you can see all the options when you’re already in isearch
by typing Ctrl+h b.
This is a really useful post and has me thinking that maybe I should return to isearch
. Of course, I can have both; the real question is what should be bound to Ctrl+s.