Multiple search in vim

2009-11-19 156 words 1 min read

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="" 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="" 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="" 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="">Text Edior ( <li class="zemanta-article-ul-li"><a href="">VIM video tutorial ( <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href=""><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related pretty-attribution">


Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it