I installed Cygwin/x on my PC, and I've set the terminal to xterm-256. But when I start vim from cygwin terminal, the look and feel of the same color scheme is different on cygwin and gvim. gvim always looks more pleasant, more clear. How can I make the look and feel of vim in cygwin be the same as gvim?
Cygwin terminal limitations
The default Cygwin terminal is based on the Windows console and inherits its limitations (very few colors, no font styles like bold or italic). You can find out how many colors are available to Vim via
For me, that gives a meager
8. To get 256 colors, you need to use a terminal emulator that support high colors, e.g. PuTTY:
putty.exe -ssh localhost
Need colorscheme with terminal support
Of course, all of this assumes you've chosen a colorscheme that actually supports color terminals. This is the case if the
:highlight output contains
ctermbg= definitions, not just ones starting with
What if you have a GUI-only colorscheme (but you like it)? Plugins like CSApprox can take the GUI color definitions and convert them to a closely matching 256-color
cterm color palette for high-color terminals. This helps with colorschemes that otherwise only pick from the bland default 16-color terminal color palette, or only provide GUI color definitions.
Another approach is taken by csexact, which modifies the (supported) terminal's palette to exactly match Vim's GUI colors.
When I started with Vim something that droves me crazy was this issue, I see pretty colors on gVim but ugly ones on vim in the console. What you need to know is that in the color schemes there are special params defined for console and for GUI. This is because basic limitations on the colors that common consoles can display.
For example, look at this line in the github color scheme:
hi LineNr ctermfg=246 ctermbg=15 guifg=#959595 guibg=#ECECEC gui=bold cterm=bold
This means that it will display a "more precise" color for the background on gui (look at guibg=#ECECEC) than on console vim (just a plain almost white "15").
Maybe this doesn't resolve your issue, but you should understand this point about Vim on console versus on GUI.