How to get Vim in cygwin/Windows to underline the CursorLine properly?

2

Here is a portion of my .vimrc :

set background=dark
set cul
hi CursorLine term=underline cterm=underline gui=underline

On Linux, vim displays fine and the cursor line is underlined with a thin white line. Using the same .vimrc file on Windows (under cygwin), the cursor line has a dark red background instead of being underlined. No amount of playing with hi CursorLine seems to do the trick. Is there a way to underline the current line on Cygwin/Windows or is that a limitation of the Windows command window?

Fred

Posted 2011-07-11T20:02:44.643

Reputation: 209

1What is your version of Cygwin and VIM? Those commands as given work fine for Cygwin 1.7.9-1 + Vim 7.3 running within mintty. – Darren Hall – 2011-07-15T16:53:18.270

Answers

3

This is a failing in the Windows console; it has no way to render underlined text, but uses colors instead.

With an XTerm or other terminal software the underlining should work fine as long as you have

:set cursorline

njd

Posted 2011-07-11T20:02:44.643

Reputation: 9 743

You are right. I use minTTY now and it looks fine. Thanks. – Fred – 2011-11-22T21:16:07.083