next up previous contents
Next: Scrolling Up: Getting Around with the Previous: Basic Movement   Contents

Navigation by Search

A very convenient way to get around is by searching for a word located at the position you'd like to go to. Vim offers several mechanisms for searching, which gives you some flexibility in your approach.

Figure 5: Simple Search Commands
\begin{figure}\begin{tabular}{ll} Search Mechanism & Key \\
\hline search forwa...
...s occurrence of word under the
cursor & \char93 ,* \ \end{tabular} \end{figure}

The f and t commands are most useful for finding characters that appear infrequently in your document, like punctuation marks; as such, I don't use them frequently. But searching using the / and ? commands is a fast way to get around your document. You can type ? Dingleberry to be taken to the most recent use of that word in your document. Continue searching in that direction by pressing n (in this case, since we're searching upwards, n will continue searching upwards) or N to search in the opposite direction (in this case, down). Use a prepended numeral to jump that many search results: ? fleabag and then 3n will search for the word fleabag and take you to the 4th occurrence.


next up previous contents
Next: Scrolling Up: Getting Around with the Previous: Basic Movement   Contents
Randall Wood 2009-08-04