If I do that:
$ cat > test.vim <<EOF
set spellfile=/tmp/en.utf8.add spelllang=en_us spell t_Co=256
hi clear
hi SpellBad guisp=red gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=undercurl cterm=undercurl
hi SpellCap guisp=orange gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=undercurl cterm=undercurl
hi SpellRare guisp=blue gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=undercurl cterm=undercurl
hi SpellLocal guisp=green gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=undercurl cterm=undercurl
spellrare emacs
call setline(1, 'is your favourite edditor vim or emacs?')
EOF
$ vim -f -g --clean -S test.vim # Gives the expected undercurl in
gvim-gtk3 (good)
$ vim --clean -S test.vim # No undercurl and no underline in terminal (bug!)
I expected that vim should fallback to underline in the terminal
since the doc says:
=== BEGIN QUOTE :help undercurl ===
"undercurl" is a curly underline. When "undercurl" is not possible
then "underline" is used. In general "undercurl" and "strikethrough"
is only available in the GUI.
=== END QUOTE ===
A workaround is to use term=underline cterm=underline
instead of term=undercurl cterm=undercurl as in this example:
$ cat > test.vim <<EOF
set spellfile=/tmp/en.utf8.add spelllang=en_us spell t_Co=256
hi clear
hi SpellBad guisp=red gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=underline cterm=underline
hi SpellCap guisp=orange gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=underline cterm=underline
hi SpellRare guisp=blue gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=underline cterm=underline
hi SpellLocal guisp=green gui=undercurl guifg=NONE guibg=NONE
ctermfg=NONE ctermbg=NONE term=underline cterm=underline
spellrare emacs
call setline(1, 'is your favourite edditor vim or emacs?')
EOF
Then it works as expected:
$ vim --clean -S test.vim # underline in terminal (good)
But still, I think that term=undercurl cterm=undercurl should
have a fall-back on underline automatically.
Regards
Dominique
--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAON-T_hVPfgQB6OGmP1O_U%2BskuA1eCY6aO%3Dtr_D%3D5fy1JrWPhQ%40mail.gmail.com.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment