Searching in Vim

In normal mode you can search forwards by pressing / (or <kDivide>) then typing your search pattern. Press Esc to cancel or press Enter to perform the search. Then press n to search forwards for the next occurrence, or N to search backwards. Type ggn to jump to the first match, or GN to jump to the last.

Search backwards by pressing ? then typing your search pattern. Pressing n searches in the same direction (backwards), while N searches in the opposite direction (forwards).

All credits to.. http://vim.wikia.com/wiki/Searching

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s