I ssh to a server then sudo to get root. In the shell my cursor blinks as a yellow block. When I open a file with vim if the text is the same color as my cursor the whole word is blocked out in yellow. The kicker is that it only happens with certain words in the file, not all of them. Really weird. I also noticed that I can be typing along in Vim, only to have the word I am typing block out to yellow, then I can't see my typed word any longer. Anyone ever come across this behavior before and how to fix it? As a test I ssh'ed from another server to the one I experienced the issue on and saw the same problem, so that rules out a problem in my local environment.
UPDATE - I can now confirm that its somehow tied to a history cache. If I open a file in Vim the words that turn into a yellow block are only the ones I have searched for in a previous file, or using a regex within the VIM. This is very strange.
What lines below do I need to comment out to turn off highlighting on the last used search pattern?
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
filetype plugin on
if &term=="xterm"
set t_Co=8
set t_Sb=^[[4%dm
set t_Sf=^[[3%dm
endif
I assume its "set hlsearch" is the one I need to comment out?