14.06.2014 Views

vim 101 hacks

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

Transaction ID: 85W16630AD8515549<br />

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

www.thegeekstuff.com<br />

To enable search result highlight<br />

:set hlsearch<br />

After this when you search for a keyword using /keyword, all the matches of<br />

the keyword will automatically be highlighted in the current file.<br />

Key<br />

:set hlsearch<br />

Description<br />

Enable search result highlighting<br />

Note: Add this to ~/.<strong>vim</strong>rc to make it permanent<br />

:set nohlsearch<br />

Disable search result highlighting<br />

:nohlsearch<br />

Clear the active search highlights<br />

Hack 93. Vim Incremental Search<br />

Once you get used to incremental search, you cannot live without it in Vim<br />

editor.<br />

To enable Incremental search,<br />

:set incsearch<br />

Incremental search will start searching for the keyword as soon as you start<br />

typing.<br />

139

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

Saved successfully!

Ooh no, something went wrong!