0

I am using vi editor. My problem is after searching some texts, say "something", if there are texts matching, the matched texts "something" will get brown background and it will not go away even I close the file and re-open it again. Too many matches make the text hard to read. Does anyone know how to turn off this annoying background?

user2045447
  • 1,351
  • 2
  • 8
  • 6

2 Answers2

0

As it is pointed out in the link provided by Vijay type:

:set nohlsearch

You can get back to the highlight mode typing:

:set hlsearch

before next search.

Community
  • 1
  • 1
cpp
  • 3,743
  • 3
  • 24
  • 38
  • Thanks guys! That's very helpful. BTW, I thought of a quick dirty solution for this yesterday. You can actually search something that you are sure won't be found. Then all the highlights will go. :) – user2045447 Aug 28 '13 at 22:52
0

Or :nohl if you just want to turn off the current ones, without disabling the feature.

Annihilannic
  • 159
  • 2
  • 2