1

When I enable vim's spellchecker using :set spell underlines appear under any misspelled words in urxvt.

However, when I try the same in xfce-terminal (on the same machine, using the same .vimrc and ediing the same file) no underlines appear. The spellchecker is still working as misspelled words can be navigated between, it is just the underlines that are not showing.

Does anyone know what settings in vim or xfce-terminal are causing this to happen.


Edit: This seems to be an issue specifically with vim rather than the terminal itself. Underlines printed using echo still display correctly, i.e:

echo -e "\e[4munderline\e[0m"
3

This problem is due to vim trying to use undercurls (wiggly underlines) rather than normal underlines, but being configured incorrectly.

Check that your terminal supports undercurls by trying to print some:

echo -e '\e[4:3mcurly underline (new in 0.52)\e[4:0m'

If they display correctly then the problem is due to vim. Most likely due to vim's t_Cs and t_Ce variable being set incorrectly.

There is a related issue here, which recommends adding the following to your .vimrc:

let &t_Cs = "\e[4:3m"
let &t_Ce = "\e[4:0m"

After doing this undercurls started being displayed in vim for me.

| improve this answer | |
  • 1
    FYI: xfce4-terminal >= 0.8, combined with VTE >= 0.52 supports curly underline. The feature is slightly more than 2 years old now. Whenever you upgrade your system, don't forget to drop the workaround for a more beautiful experience. – egmont Apr 28 at 20:11
  • 1
    @egmont Thanks for your comment. I checked my versions and both were above this, and after testing my terminal does actually support undercurls. I've now found a solution that makes undercurls work, I have updated my answer. – JShorthouse Apr 28 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.