I searched this issue on the web to no avail and it's most likely not here too. The issue I'm facing goes like this

I am trying to switch to vim since I find it cool. I was writing my vimrc and figured that I had to set t_C0 to 256 to display colors properly in my terminal(I'm on Windows). After sometime I discovered that I can highlight the current line the cursor is on and set it. it worked well and the syntax highlights on that line were showing just fine. When I set termguicolors it worked like a charm except for one thing, it broke the syntax highlighting of the current line the cursor is highlighting, the highlighted line displays the text with a fully white foreground color. I fired up gVim to check if the issue occurs there too and it works as intended there(syntax highlighting shows properly on the current line). I would like to know if there is anything I could I do to fix this problem. I am attaching the images and my vimrc down below.

How it looks with t_Co set to 256 and without termguicolors enabled

Vim with only t_Co set to 256

How it looks with termguicolors enabled

Vim with termguicolors enabled

Please look at how the highlighted line is displayed

Click here to view my vimrc


  • Comments are not for extended discussion; this conversation has been moved to chat.
    – D. Ben Knoble
    Jul 21 at 19:01
  • I've edited the title and tags. I used microsoft-windows based on a mistaken use of vim-windows—if that is not the correct platform, please remove it.
    – D. Ben Knoble
    Jul 21 at 19:05
  • You may also want to look at How to debug my vimrc, trim down your vimrc for any debugging you do, and post the minimal version in the question (links die, so we tend to avoid those for things that important to the content)
    – D. Ben Knoble
    Jul 21 at 19:06

Your Answer

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

Browse other questions tagged or ask your own question.