Searching

See the aardvark, a few lines down? It’s worth remembering that it’s often faster get to it by using C-s to search than by moving the cursor. Emacs expects you to search frequently, that’s why searching takes less key presses than C-x s, the save command.

Here’s a reminder of the search commands:

C-s C-w         Search for word after point
C-s C-s         Repeat last search
C-s C-y         Search line
C-s M-y         Search last kill
C-u C-s         Regexp Search
C-u C-r         Regexp Reverse Search

Emacs incremental search can occasionally be a pain. Don’t forget you can search non-incrementally for a specific word such as elephant using

M-s w <RET> elephant <RET>

Here’s the aardvark, by the way.

Leave a Comment