Open mklein994 opened 6 years ago
I badly wanted this. Notice that since this issue was opened a good amount of underline styling variations now exist, NeoVim/Tmux/Alacritty all support having (from NeoVim docs):
1. TUI highlight arguments
*bold* *underline* *undercurl*
*underdouble* *underdotted*
*underdashed* *inverse* *italic*
*standout* *nocombine* *strikethrough*
cterm={attr-list} *attr-list* *highlight-cterm* *E418*
attr-list is a comma-separated list (without spaces) of the
following items (in any order):
bold
underline
undercurl curly underline
underdouble double underline
underdotted dotted underline
underdashed dashed underline
strikethrough
reverse
inverse same as reverse
italic
standout
nocombine override attributes instead of combining them
NONE no attributes used (used to reset it)
Note that "bold" can be used here and by using a bold font. They
have the same effect.
"undercurl", "underdouble", "underdotted", and "underdashed" fall back
to "underline" in a terminal that does not support them. The color is
set using |guisp|.
Good to mention that we also have colored underlines established these days, not a floating idea anymore. I use both features, styled & colored underlines, in my standard setup, which I have to disable when over termux.
It would be great if support could be added for styled underlines.
Here's a brief overview:
\e[4:1m
straight underline\e[4:2m
double underline\e[4:3m
curly underlineNote: the colon is strictly required, as something like
\e[4;1mHello\e[0m
would print a bold, underlined "Hello" to the console. This is discussed in the neovim issue.Support for this was added to neovim in https://github.com/neovim/neovim/issues/7479, and in tmux (so far without color support) in https://github.com/tmux/tmux/issues/1492. There's an idea floating around that the underline can be given a color using
58:2:<r>:<g>:<b>
or58:5:<x11 color>
, similar to how it's done for true colors. From what I've read,CSI 59
resets the underline color. (I'm not a terminal developer, so please forgive me if I'm butchering these terms).Here's an example:
This produces "Hello", with an orange wavy underline. I've tested it and it works on both mintty and kitty.