Cygwin vim doesnt show 256 colors under ConEMu

4

1

When using cygwin vim under ConEmu, the default vim theme doesnt display correctly after I set t_Co=256.

This is how ConEmu looks after the command: http://postimg.org/image/g6g98exbx/

My .vimrc:

set nocompatible
execute pathogen#infect()
filetype plugin on
syntax on
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
colorscheme solarized

My vim --version: http://pastebin.com/1NFaA8YK

I am using ConEmu v131017.

Thanks for your help.

tulhan

Posted 2013-10-18T15:06:28.137

Reputation: 346

3There are other similar questions here and on SO. The answer is this: ConEmu does weird things and you can't expect it to work well with Vim in 256 colors. You should get in touch directly with the author to make him fix his terminal emulator. – romainl – 2013-10-18T15:53:50.763

@romainl, weird comment, I think... are you expert in vim? – Maximus – 2013-10-18T17:27:03.513

@Naresh, Show you vimrc which produces your screenshot. What vim color scheme you've selected in vimrc? Are you sure your scheme is 256color? Also, what is shown by vim --version -cur_console:i? – Maximus – 2013-10-18T17:31:16.873

@Maximus Edited post to include the info. You're doing a damn fine work with ConEmu. Ignore anyone who says otherwise ;) – tulhan – 2013-10-19T04:09:54.863

Answers

0

My cygwin installation does not contains solarized scheme.

1) You must be sure your scheme is 256color, like, for example, zenburn colorscheme.

2) You must be sure if your vim version supports 256colors. It is easy, just uncheck option "ANSI X3.64 / xterm 256 color" in ConEmu settings ("Features" page ATM) and you must get raw ANSI sequences in the console, like this screenshot: enter image description here

If your still see weird "colors", but not a RAW ANSI (←[48;5;...) that means that your vim version does not support xterm at all. Vim tries to approximate your nice scheme to simple 8 colors.

Unfortunately, I don't know why cygwin vim don't like to use 256 colors running in ConEmu, regardless strict settings. For example, official vim runs xterm nicely.

Maximus

Posted 2013-10-18T15:06:28.137

Reputation: 19 395

I do not see any RAW ANSI after disabling ANSI X3.64 / xterm 256 color. The issue appears to be a problem witn Cygwin vim. But i am having the same issue running official vim on cmd.exe. Disabling ANSI X3.64/xterm 256 color shows me RAW ANSI, so xterm is supported. But why still the issue? – tulhan – 2013-10-19T18:32:17.600

ConEmu settings -> Colors -> TrueMod (24bit) color support? – Maximus – 2013-10-19T20:18:01.820

Same issue, whether TrueMod support is enabled or disabled. – tulhan – 2013-10-19T20:37:46.393

Show screenshots of ConEmu with status bar when raw codes are visible and when not. – Maximus – 2013-10-19T22:26:14.313