Skip to content

Searching for words

pgen edited this page Aug 3, 2018 · 1 revision

Three different search methods are available:

  1. By prefix (keys ^ or =)
  2. By substring (keys " or ')
  3. By using a (so called) fuzzy method (keys * or ~)

The / key is also assigned to the fuzzy search method by default but can be re-assigned to any search methods using the -/ option.

When searching, the following special keys are available:

  • The Esc and Enter keys allow you to return to navigation mode. Esc also interrupts the search and clears the pattern.
  • The Home and End keys allow you to restrict the search to words starting or ending with the pattern.

After pressing one of the search keys, the appearance of the cursor changes. Note that in these screenshots, the default colors and attributes are the default ones.

After pressing Enter, the n and N keys move the cursor to the next (previous) matching word.

By example, if we have the following window on the terminal:

images/ex-search0.png

Pressing / displays something like the following image:

images/ex-search1.png

After having hit l and e, the terminal shows:

images/ex-search2.png

Enter terminates the search session:

images/ex-search3.png

Pressing n moves the cursor to the next matching word:

images/ex-search4.png

Pressing Esc cleans the search buffer and returns to navigation mode:

images/ex-search5.png

The following animation summarizes these steps:

images/ex-search-sub.gif