I'm using Vim 8.2 on Fedora 32. I have the following lines in
~/.vimrc for highlighting the
MatchParen highlight groups:
highlight Cursor guibg=Green guifg=Black highlight lCursor guibg=Green guifg=Black highlight CursorLine cterm=NONE guibg=Gray7 highlight MatchParen guibg=fg guifg=bg
I also enabled RGB colors for vim with the below lines:
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" set termguicolors
In gvim, when the matching pair of a charachter included in
'matchpairs' is higlighted (as specified by the above highlight command for the
MatchParen highlight group), the character under the cursor is highligted exactly as specified by the above highlight command for the
Cursor highlight group (i.e. green bg and black fg). However, in vim, the foreground color of
Cursor becomes the same as the background color of
Also, to disable any defaults unknown to me, I tried setting
NONE for all highlight commands, and disabling highlighting the current line, but nothing I did fixed the issue. I checked
:hi for the set colors, and nothing surprising there. It seems strange to me that the highlighting is fine in gvim but not in vim.
UPDATE: The issue exists in xterm, but not in Gnome terminal.