3

Somehow, over the last few days, the visual mode in Vim no longer flips the background highlight, as it used to. Now, if the file is recognized by something it can syntax highlight, it seems to unbold and darken colored text. But, for non-syntax highlighted text, or files it doesn't know the syntax of, there is no highlighting at all. Visual mode still selects normally for selections, but there's not visual difference over a selected area for non-syntax highlighted text.

How can I clear/correct/reset the visual mode selection highlighting?

Clarifying Details:

  • Vim 7.4
  • Vundle for plugins
    • I've tried removing and disabling any new plugins, no effect
  • vim -u NONE seems to restore it to what I would expect
  • Turning on set :hlsearch properly enables search highlighting as usual
huntmaster
  • 157
  • 1
  • 1
  • 5
  • 8
    If vim -u NONE fixes it, then you're after this: http://vi.stackexchange.com/questions/2003/how-do-i-debug-my-vimrc-file – grochmal Aug 19 '16 at 01:15

2 Answers2

13

I had this issue as well because I had switched to the "evening" color scheme in my ~/.vimrc file so that my comments were easier to read on a dark background:

:colorscheme evening

To restore visual mode highlighting I had to also add this:

:highlight Visual cterm=reverse ctermbg=NONE
Integrator
  • 231
  • 2
  • 4
  • 3
    I have same issue as you. I usually set background=dark which is similar with colorscheme evening, and in tmux, the visual mode will lose its highlight. Now I get it back. Thank you for your answer. – Bruce Jun 27 '18 at 21:39
1

Debugging my .vimrc file led me to discover that my colorscheme seemed to be the cause. Changing it to something else fixed the problem.

huntmaster
  • 157
  • 1
  • 1
  • 5