vi has the ability to move the cursor to locations based on searches. It can do this on either a single line or over an entire file. It can also perform text replacements with or without confirmation from the user.
f command searches a line and moves the cursor to the next instance of a specified character. For example, the command
fa would move the cursor to the next occurrence of the character a within the current line. After performing a character search within a line, the search may be repeated by typing a semicolon.
To move the cursor to the next occurrence of a word or phrase, the
/ command is used. This works the same way as in the
less program we covered in Chapter 3 ...