wyc
wyc

Reputation: 55283

How to change the color of Vim's (straight) underline?

I've tried everything changing the color of this:

call s:h("Underlined",    {"fg": s:norm, "gui": "underline", "cterm": "underline"})

As well as all the colors of the link texts.

Does anybody know how to change it?

Here's a picture:

enter image description here

Upvotes: 9

Views: 5496

Answers (2)

Ingo Karkat
Ingo Karkat

Reputation: 172638

For a long time, you couldn't; the underline color always equaled the text color. AFAICT, in terminals this wasn't supported, and for consistency, Vim also didn't offer this in GVIM.

With Vim 8.2.0863, the ctermul attribute allows setting a separate color for underline / undercurl now. Apparently, this still isn't supported in GVIM, though (which I find odd, because Vim usually values consistency in features over fancy stuff (as explained by :help design-not)).

In GVIM, you could switch to the (GUI-only) undercurl attribute (mostly used for spell checking), which supports a separate "special color", set via guisp={color-name}; see :help highlight-guisp.

Upvotes: 7

Roland Fredenhagen
Roland Fredenhagen

Reputation: 191

For anyone finding that in 2021, you can use guisp=red in neovim at least.

For example I use

:hi CocErrorHighlight gui=undercurl guisp=red 

to have red curly lines.

I am using NeoVim in the Xfce-Terminal.

Upvotes: 8

Related Questions