[vim/vim] guisp support when using termguicolors (#819)

98 views
Skip to first unread message

petobens

unread,
May 19, 2016, 12:51:38 PM5/19/16
to vim/vim

I'm using termguicolors, but I can't seem to be able to change the spelling underline/undercurl highlight when running Vim from the terminal. I tried with:

hi SpellBad    ctermfg=203   ctermbg=233  cterm=underline gui=undercurl guisp=#fc4234

Is guisp supported by the termguicolors feature?
Thanks in advance.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

Nikolay Aleksandrovich Pavlov

unread,
May 19, 2016, 3:23:38 PM5/19/16
to vim_dev, reply+00b1d198f29f3058c1ef2e81ebc1633cd16c329...@reply.github.com, vim/vim
2016-05-19 19:51 GMT+03:00 petobens <vim-dev...@256bit.org>:

I'm using termguicolors, but I can't seem to be able to change the spelling underline/undercurl highlight when running Vim from the terminal. I tried with:

hi SpellBad    ctermfg=203   ctermbg=233  cterm=underline gui=undercurl guisp=#fc4234

Is guisp supported by the termguicolors feature?
Thanks in advance.


​I do not know a way to set highlighting of the underlining in terminal, so I never tried to implement `guisp` with &termguicolors.​

 


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian Brabandt

unread,
May 20, 2016, 7:49:05 AM5/20/16
to vim/vim, vim-dev ML, Comment

Closed #819.


You are receiving this because you commented.

Christian Brabandt

unread,
May 20, 2016, 7:49:08 AM5/20/16
to vim/vim, vim-dev ML, Comment

So this is not possible. Closing then.


You are receiving this because you commented.

Nikolai Aleksandrovich Pavlov

unread,
May 20, 2016, 8:51:24 AM5/20/16
to vim/vim, vim-dev ML, Comment

“I do not know” ≠ “it is not possible”. AFAIR I examined issue a bit, but found nothing in xterm escape sequences and no good spec for konsole ones, but there are many different terminal emulators with different non-standard escape sequences. Though most likely if somebody finds something like this then some sort of campaign will be needed to make this supported in modern terminal emulators: like it was done for true colors (when I have written my 24-bit-xterm branch AFAIR only konsole supported true colors, and xterm had a limited support (understood, but mapped to closest (in RGB space) color in 8-bit palette)).


You are receiving this because you commented.

Dominique Pellé

unread,
May 20, 2016, 9:18:03 AM5/20/16
to vim/vim, vim-dev ML, Comment

@ZyX-I wrote:

I do not know a way to set highlighting of the underlining in terminal, so I never tried to implement guisp with &termguicolors.​

The CSApprox plugin contains a variable to let user decode how to convert some GUI attribute to the terminal. See help file CSApprox.txt (https://github.com/godlygeek/csapprox/blob/master/doc/CSApprox.txt):

Relevant snippet:

g:CSApprox_attr_map                                      *g:CSApprox_attr_map*
    Since some attributes (like 'guisp') can't be used in a terminal, and
    others (like 'italic') are often very ugly in terminals, a generic way to
    map between a requested attribute and another attribute is included.  This
    variable should be set to a Dictionary, where the keys are strings
    representing the attributes the author wanted set, and the values are the
    strings that the user wants set instead.  If a value is '', it means the
    attribute should just be ignored.  The default is to replace 'italic' with
    'underline', and to use 'fg' instead of 'sp': >
        let g:CSApprox_attr_map = { 'italic' : 'underline', 'sp' : 'fg' }
<
    Your author prefers disabling bold and italic entirely, so uses this: >
        let g:CSApprox_attr_map = { 'bold' : '', 'italic' : '', 'sp' : 'fg' }
<

    Note: This transformation is considered at the time a snapshotted scheme
          is created, rather than when it is used.

    Note: You can only map an attribute representing a color to another
          attribute representing a color; likewise with boolean attributes.
          After all, sp -> bold and italic -> fg would be nonsensical.

Now I don't know whether something like this should be done in Vim, but it may give ideas.


You are receiving this because you commented.

Nikolai Aleksandrovich Pavlov

unread,
May 20, 2016, 9:22:23 AM5/20/16
to vim/vim, vim-dev ML, Comment

@dpelle About guisp this snippet directly tells you that it “can’t be used in a terminal”. gui attribute AFAIR is ignored completely, &termguicolors only works with guifg/guibg.


You are receiving this because you commented.

Bastian Venthur

unread,
Aug 31, 2017, 3:41:06 AM8/31/17
to vim/vim, vim-dev ML, Comment

How about replacing the undercurl with underlines in terminals when setting the termguicolors option? I assume this comes closest to the behavior a user would expect. When ignoring the undercurl completely the user will not see any spelling mistakes by default in the terminal when using the termguicolors option, which is certainly not expected.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub

Reply all
Reply to author
Forward
0 new messages