Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed vim 7.3 under cygwin.

And I have this in my ~/.vimrc

$ cat .vimrc
colorscheme wombat

And then I have this file wombat.vim under '.vim/colors'.

 $ ls -la .vim/colors/
total 8.0K
drwxrwxr-x+ 1 cheungs mkgroup    0 Nov 12 00:04 ./
drwxrwxr-x+ 1 cheungs mkgroup    0 Nov 12 00:04 ../
-rw-r--r--  1 cheungs mkgroup 1.5K Nov 12 00:04 wombat.vim

But when I 'vim', it shows no color, just black and white.

How can I fix it? I have the same settings under Ubuntu, and that works.

Thank you.

share|improve this question

You have to (either run or) add the following command to your ~/.vimrc file:

:syntax on

share|improve this answer

I later found that I had installed both vi and vim on Cygwin, so I added this to my .bashrc:

alias vi="/usr/bin/vim"

and then created the following ~/.vimrc file:

" double-quotes are comments for the .vimrc file
set nocompatible
set nocp
set backspace=indent,eol,start
set term=xterm-256
syntax on
set hlsearch
set t_Co=8
set t_Sb=m
set t_Sf=m

I now have syntax highlighting, INSERT/REPLACE on the home bar, as well as correct arrow key operation and backspace/delete key operation during INSERT mode. Cygwin vi now behaves as my normal Linux vi.

share|improve this answer
This should be the accepted answer, it worked perfectly for me. Thanks buddy. P.S. I recommend adding "hi Comment ctermfg=LightBlue" in the ~/.vimrc so comments are more visible – Iancovici May 12 '14 at 11:19
Thanks, echad, I was wondering how to get my comment lines more visible! – Glenn Strycker May 12 '14 at 19:47
I had to set cygwin type terminal (Options -> Terminal) to "xterm-256color" to get working – ramirio Feb 20 '15 at 11:53

As of vim-7.3.943 the vi binary is now compiled with the small featureset. To get syntax highlighting you must use vim (or alias vi to vim...).

This is likely a newer version than was available at the time of OP, but it is relevant now and is still v7.3 as listed in the OP.

share|improve this answer

You should change cyngwin terminal options to xterm-256. Then restart termin

share|improve this answer
You should add more detail to your question elaborating on why your solution works – Shekhar Nov 13 '13 at 18:31
No, cygwin terminal is configured fine by default. Either of them (console host or mintty). – Jan Hudec May 1 '14 at 20:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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