syntax highlight

Monday 27 April 2009

Vim Tip: Find Next

In normal mode, move the cursor to any word. How do you search for the next occurrence of that word?

Press the * key to search forwards for the current word, or press # to search backwards.

Using * or # searches for the exact word at the cursor (searching for rain would not find rainbow).

Use g* or g# if you don't want to search for the exact word.

No comments:

Post a Comment