14.06.2014 Views

vim 101 hacks

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Buyer: xiujuan lu (luxiujuan@gmail.com)<br />

Transaction ID: 85W16630AD8515549<br />

Vim <strong>101</strong> Hacks<br />

www.thegeekstuff.com<br />

Chapter 13: Power of Search<br />

Hack 87. Navigation by Search<br />

Execute /search-term to search for the first occurrence of keyword from the<br />

current position.<br />

Navigation Key<br />

Description<br />

/ Search forward (also used as Find next)<br />

? Search backward (also used as Find previous)<br />

When you do /search-term , it will search for the first occurrence of searchterm<br />

from the current position. After that, you only need to type n or N to<br />

search for the same search-term again. These are similar to ‘Find Next’ and<br />

‘Find Previous’ in many applications.<br />

Navigation Key<br />

n<br />

Description<br />

Go to the next occurrence (Find Next)<br />

N<br />

Go to the previous occurrence (Find Previous)<br />

// (or) ?? Repeat previous forward or reverse search<br />

127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!