Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just learned about :grep in vim which is great for searching in multiple files. What troubles me is that when I have found the line I'm after, I'd like to remove all quickfix hightlights. And I cannot find how to do that properly.

The only "solution" I have is to run another :grep for something that does not exist, like :grep XZYXZ %. But I have a feeling there must be a real command to remove the quickfix highlights?

edit: see screenshot. I want to remove the red lines (which highlight the :grep matches).

example

share|improve this question

2 Answers 2

up vote 1 down vote accepted

That would be "search highlight", not "quickfix highlight".

You can toggle highlighting or simply keep it disabled and use the actual quickfix window to locate and jump to matches (what I do):

:vimgrep pattern * | copen
share|improve this answer
    
thx for the answer. but that does not work in my vim. I added a screenshot now. the red lines are :grep matches and the underlined toList's are search matches. toggling search highlighting only removes the underlining of toList. –  deadsven May 25 '12 at 11:35
1  
You are using a special plugin/script/setting that highlights error lines and marks them with a sign. Because :grep's matches are added to the error list they are highlighted like errors and the usual "search highlighting" doesn't apply. Try :lgrep which uses the location list instead of the error list. –  romainl May 25 '12 at 13:07
    
It was so much easier to approach your issue with a screenshot. –  romainl May 25 '12 at 13:15
    
you were right about the plugin. found out it was github.com/MarcWeber/vim-addon-signs which somehow was drawn into my config. if i remove the plugin, all the red lines dissapear. –  deadsven May 25 '12 at 18:01

Have you tried

:nohlsearch

It will disable the current search highlighting.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.