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 />
Key<br />
:<strong>vim</strong>grep searchterm<br />
*<br />
:cn<br />
Description<br />
Search for search-term in multiple files<br />
Jump to the next match of the <strong>vim</strong>grep search<br />
:cN<br />
Jump to the previous match of the <strong>vim</strong>grep search<br />
:clist<br />
View all the files that matched the <strong>vim</strong>grep search<br />
keyword without jumping to the individual files.<br />
:cc number<br />
Jump to the specific search number. Pick the<br />
search number based on the :clist output<br />
You can also do recursive searching using <strong>vim</strong>grep. Use ** for recursive<br />
searching as shown below.<br />
For example, the following will search for the search term table in all *.html<br />
files under the current directory and all subdirectories.<br />
:<strong>vim</strong>grep table **/*.html<br />
Hack 92. Highlight Search Results with Color<br />
When you search for a keyword, you may want to automatically highlight all<br />
the matches. Use :hlsearch option for this.<br />
138