1

The issue

My custom highlighting styles for Visual mode selection of text is not as it was. It use to be yellow background with black text. Now it is just underlined.

Environment

vim 8.0 term, not the gui version. Mac OS 10.12.6, iTerm2 3.2.3, Terminal 2.7.3

Troubleshooting

  • I have tried iTerm2 and Terminal
  • I have tried zsh and bash
  • I have tried in and out of a Tmux session (I pretty much live in a tmux session)
  • I have started it with no rc file vim -u NONE
  • I have tried different themes (I use a custom theme)
  • I have unset every environment variable I can think of that might be messing with it; TERM, EDITOR, SHELL, and many many more.
  • Manually set :highlight Visual cterm=reverse ctermbg=NONE (no change at all)
  • :verbose hi Visual? returns highlight group not found: Visual?
  • I manually set :set sessionoptions-=options and :set sessionoptions-=folds
  • I manually set the syntax and have played with different file types, and they are all the same. (python, dockerfile, json, yml, js, css, etc)

When this happened

After a crash. I had it up for 100+ days, and was overworking it like crazy and it just went blank and rebooted.

Current conclusion based on troubleshooting results

So based on the troubleshooting I have done, I think it is safe to say it is not the terminal or terminal configuration/themes/colors/etc, it is not the type of shell, it is not tmux, it is not the vimrc file, it is not the colorscheme, or it is doesn't seem to be environment variable related. I could be wrong, maybe I was not thorough enough with my tests. But I literally saw 0 difference with all of the listed troubleshooting.

Next steps / Remaining questions

What confuses me and I'm very suspicious of is the :verbose hi Visual? returns highlight group not found: Visual?. What would cause this? I can't seem to find it from searching here and google.

Am I missing something? Do you guys have any further suggestions? I do have an additional question for troubleshooting. I have used this for designing my custom colorscheme. Where you can set your cursor over some text and get vim to tell you what the highlight syntax is. Is there a way to do that for when you are in Visual mode and have selected text? Because if Visual is missing and manually setting is not changing it, I'm thinking that it is possibly just styled based on another highlight.

  • What happens with :verbose hi Visual (no trailing question mark?) – D. Ben Knoble Oct 14 '18 at 17:43
  • :verbose hi Visual Visual xxx term=reverse ctermbg=220 guibg=#f2c600 Last set from ~/.vim/colors/my-theme.vim Which is what I would expect. However I would like to note, I have other highlights with this same color settings, and they styled fine. Also what you can't see from this text is the xxx is actually yellow with black text. But not in the file I'm editing when I'm in Visual mode and select text. Which makes no sense. I also opened a file without the rc file and manually set it, it still does not reflect the colors set. – Byron Mansfield Oct 14 '18 at 18:39
0

XQuartz was not running after the reboot. I launched XQuartz and opened a new fresh vim session and viola. It worked like normal. I didn't have to change anything. I am curious to know as to why exactly having a X window server running impacts vim's visual selection highlight settings. If anyone could explain that it would be much appreciated

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.