Multiple search in vim

2009-11-19 1 min read Learning Linux

I was looking at a log file and needed to highlight multiple search items to make the logs more readable. I got into multiple threads suggesting various cryptic vim commands but I was in no mood to remember them. So, I finally hit <a href="http://www.vim.org/scripts/script.php?script_id=479" target="_blank">this.

This is a cool vim script which you can use to highlight multiple search patter. You can simply add a search term by doing

<img style="vertical-align: bottom;" src="http://sc.webmessenger.msn.com/10.1.0323.0/session/images/emoticons/smile_confused.gif" alt=":S" />earch

By default it is configured to have four colors but you can change that. Also when you want to reset the search you can simply do:

<img style="vertical-align: bottom;" src="http://sc.webmessenger.msn.com/10.1.0323.0/session/images/emoticons/smile_confused.gif" alt=":S" />earchReset<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://wknight8111.blogspot.com/2009/10/text-edior.html">Text Edior (wknight8111.blogspot.com) <li class="zemanta-article-ul-li"><a href="http://www.slumpedoverkeyboarddead.com/2009/08/06/vim-video-tutorial/">VIM video tutorial (slumpedoverkeyboarddead.com) <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/47b68779-3396-426c-9b94-21da708a3b5a/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e7.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related pretty-attribution">

comments powered by Disqus