|Lesson 3||Searching for text in vi|
|Objective||Use vi commands to search for text.|
| ||Search forward for pattern|
| ||Search backward for pattern|
| ||Repeat search in the same direction|
| ||Repeat search in the opposite direction|
?commands behave somewhat like
excommands, because the
?appear on the status line. Also, you must press Enter after typing the pattern. After finding a pattern using the
?command, you can use
Nto search for the next occurrence. The
Ncommands are regular vi commands. They take effect immediately, with no need to press Enter.
$. They have the same meanings as when they are used with
\. to search for an actual period.
:abcommand to abbreviate text.