Previous: , Up: Edit and View modes   [Contents]

Find text

To search for text in the buffer, use the find-text mode.

images/dt-findtext1
Ctrl+Shift+F (find-text) (except find-text mode)
Ctrl+F (View or line-edit modes only)

Enter find-text mode.

The find command highlights text that matches a search string or regular expression. Keypresses and standard editing keys (such as Left or Delete) update a search string displayed in a “mini-buffer”. Matching text is highlighted, by default using a yellow background. (Specifically, matched text is temporarily wrapped in a <mark> element.)

Escape (find-exit)

Exit find mode, setting the selection to the current match.

Shift+F (find-select-pattern)
Ctrl+Shift+F (find-select-pattern)

If already in find-text-mode, these keystrokes select the entire pattern minibuffer.

Assuming we’re searching forwards, the first match that starts at or after the “base position” is selected, with the focus position set to the end of the match. The base position is initially the caret (focus position if defined, otherwise the output position). Each “selection-next” sets the base position to the focus position, and redoes the search. You can click on either arrow button or use the following keystrokes.

Down (find-next-match)
Enter

Select the next match: Sets the base position to focus position and redoes the search in forward direction. Sets the search direction to forwards: Editing the search will select the first match after the base position.

Up (find-previous-match)
Shift+Enter

Select the previous match. Sets the search direction to backwards: Editing the search will select the first match before the base position.

You can control the search mode either using the shortcus shown below, or by clicking on the gray mode button, and selecting from the dropdown button.

images/dt-findtext2
Alt+C (find-toggle-match-case)

Enable or disable case-matching.

Alt+W (find-toggle-match-word)

Enable or disable matching of whole words (match must start and end on a word boundary).

Alt+R (find-toggle-match-case)

Enable or disable searching using regular expressions.


Previous: , Up: Edit and View modes   [Contents]