1

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
8

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
  • 2
    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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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