| Did you know ... | Search Documentation: |
| terminal_image->isearch_forward |
\C-\S-f is bound to
terminal_image->isearch_backward,
as a terminal's history lies behind the caret. While the search runs it
has every key (see
terminal_image<-focus_function):
The hit is painted in terminal_image<-isearch_style
and the other matches on the screen in terminal_image<-isearch_other_style.
A search owns that feedback while it runs, so the selection's own
matches (see terminal_image->selection)
are not shown as well; leaving a search with the hit selected hands them
straight over. What it reports as it goes -- through visual->report,
so where that lands is the window's business -- says which of the
matches it is on and how many there are, as
(3/4). Those are counted over the whole buffer, and from
its start whichever way the search is going, so a search backwards
begins at the last of them and counts down. Every place the string
occurs counts, overlapping ones included: a repeat steps a single
character, so those are places the search can get to.
,^S^RThe next hit, forwards resp. backwards Backspace Drop a character and search again ^WTake the word behind the hit into the search string, along with whatever separates the two, so that pressing it again walks on word by word. Not across a line: a search string with a line break in it matches almost nothing M-cTurn terminal_image <->exact_case on or offM-wTurn whole-word matching on or off, as terminal_image <-match_word reports it^GGive back the view and the selection the search started from Escape, Return Leave the search with the hit selected Any other key Leaves the search, and then means what it usually means
A search that started from a selection (terminal_image->isearch_selection_backward)
differs in one way: ^G puts that selection back rather than
leaving none.
Two things differ from editor->isearch_forward. Escape
and
Return are swallowed rather than passed on: an unhandled key
here reaches the process on the terminal, and leaving a search is no
reason to submit a line to a shell. ^C is the exception
that proves it -- it ends the search and then interrupts, or a search
started over a running program would trap the interrupt.
Running out of hits only says so; the attempt after that starts over at the far end of the buffer. A search refuses to start on the alternate screen, whose lines are not in the buffer, and an application that claims the screen ends one that is running.