This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: vim 5.0 termcap entries/color


marius van wyk (marius@e.co.za) wrote:
>I was able to get vim5 beta running in pcansi-mono using minimal
colours in
>b18, but no such luck with b19.
>
>The terminal capabilities are tricky to set up and compile into vim:
Anyone
>got any suggestions there?

Hi, Marius.

Install the ncurses library under CygWin32 and rebuild vim5. 
The CygWin32 console terminals support only a limited number 
of colors, but enough for useful highlighting.

Here is how I built and installed ncurses-4.1 and vim-5.1 in the 
CygWin32 environment.  This is b19, not b19.1, and I don't have 
any of Sergey's latest versions; you may need to adjust if you 
have these.  Note I installed CygWin32 b19 in e:\Cygnus and that 
my CygWin32 mount table looks like this (you need to mount /usr 
and /bin directories for the rest of what follows to work, and 
use binary mounts for all CygWin32 directories):

  Device           Directory           Type        Flags
  e:\Cygnus\b19    /usr                native      no-mixed,text=binary
  e:               /e                  native      no-mixed,text=binary
  d:               /d                  native      no-mixed,text=binary
  c:               /c                  native      no-mixed,text=binary
  e:\Cygnus\b19\H-i386-cygwin32\bin  /bin  native  no-mixed,text=binary
  b:               /b                  native      no-mixed,text=binary
  a:               /a                  native      no-mixed,text=binary
  e:\Cygnus\rootdir /                  native      no-mixed,text=binary

1.  Ensure that your .bashrc has the following:

 export CYGREL=B19
 export OSTYPE=cygwin32
 export MAKE_MODE=unix
 export CYGROOT=/e/Cygnus/B19
 export CYGFS=/e/Cygnus/B19
 export GCC_EXEC_PREFIX=/e/Cygnus/B19/H-i386-cygwin32/lib/gcc-lib/
 export TCL_LIBRARY=/e/Cygnus/B19/share/tcl8.0/
 export GDBTK_LIBRARY=/e/Cygnus/B19/share/gdbtcl

2.  Install the attached 'install' executable in place of the 
    stock CygWin32 install in /bin.

3.  Download and install ncurses-4.1 (available from 
    http://www.clark.net/pub/dickey/) as follows:

    Unpack the tarball into a temporary directory. 
    Then, from bash, just do:
      ./configure --prefix=/usr
      make
      make install

4.  Build and install vim-5.1 as follows:

    Unpack the tarball into a temporary directory.
    Edit vim-5.1/src/Makefile as follows: 
      Un-comment these lines (I have Win32 Perl and Python but 
      not the CygWin32 versions!):
        CONF_OPT_PERL = --disable-perlinterp
        CONF_OPT_PYTHON = --disable-pythoninterp
      Other settings for my CygWin32 install:
        prefix=/usr
        BINDIR=/usr/bin

    Then, from bash, just do:
      export SUFFIX=.exe
      make
      make install

Provided bash sets TERM=linux, the resulting Vim should work well
in the CygWin32 environment.  The only problem I have encountered 
so far is a minor color highlighting anomaly which I am able to 
work around by not using the Normal highlighting group.

Here are the color settings I use (this is a black background;
for TERM=linux the bold attribute makes colors brighter):

" now override the syntax.vim color settings
if &term=="linux" || &term=="ansi"

  "color settings for these terminal types:
  "colorBlack       term=NONE cterm=NONE ctermfg=0 ctermbg=0
  "colorDarkRed     term=NONE cterm=NONE ctermfg=1 ctermbg=0
  "colorDarkGreen   term=NONE cterm=NONE ctermfg=2 ctermbg=0
  "colorBrown       term=NONE cterm=NONE ctermfg=3 ctermbg=0
  "colorDarkBlue    term=NONE cterm=NONE ctermfg=4 ctermbg=0
  "colorDarkMagenta term=NONE cterm=NONE ctermfg=5 ctermbg=0
  "colorDarkCyan    term=NONE cterm=NONE ctermfg=6 ctermbg=0
  "colorLightGray   term=NONE cterm=NONE ctermfg=7 ctermbg=0
  "colorDarkGray    term=NONE cterm=bold ctermfg=0 ctermbg=0
  "colorRed         term=NONE cterm=bold ctermfg=1 ctermbg=0
  "colorGreen       term=NONE cterm=bold ctermfg=2 ctermbg=0
  "colorYellow      term=NONE cterm=bold ctermfg=3 ctermbg=0
  "colorBlue        term=NONE cterm=bold ctermfg=4 ctermbg=0
  "colorMagenta     term=NONE cterm=bold ctermfg=5 ctermbg=0
  "colorCyan        term=NONE cterm=bold ctermfg=6 ctermbg=0
  "colorWhite       term=NONE cterm=bold ctermfg=7 ctermbg=0

  highlight Comment           term=NONE cterm=NONE ctermfg=7 ctermbg=0
  highlight Constant          term=NONE cterm=bold ctermfg=6 ctermbg=0
  highlight Identifier        term=NONE cterm=bold ctermfg=1 ctermbg=0
  highlight Statement         term=NONE cterm=bold ctermfg=3 ctermbg=0
  highlight PreProc           term=NONE cterm=bold ctermfg=5 ctermbg=0
  highlight Type              term=NONE cterm=bold ctermfg=1 ctermbg=0
  highlight Special           term=NONE cterm=bold ctermfg=5 ctermbg=0
  highlight Error             term=NONE cterm=bold ctermfg=7 ctermbg=1
  highlight ToDo              term=NONE cterm=bold ctermfg=7 ctermbg=1

  highlight Directory         term=NONE cterm=bold ctermfg=6 ctermbg=0
  highlight ErrorMsg          term=NONE cterm=bold ctermfg=7 ctermbg=1
  highlight IncSearch         term=NONE cterm=bold ctermfg=3 ctermbg=0
  highlight LineNr            term=NONE cterm=bold ctermfg=3 ctermbg=0
  highlight ModeMsg           term=NONE cterm=bold ctermfg=7 ctermbg=0
  highlight MoreMsg           term=NONE cterm=bold ctermfg=5 ctermbg=0
  highlight NonText           term=NONE cterm=bold ctermfg=1 ctermbg=0
  highlight Question          term=NONE cterm=bold ctermfg=5 ctermbg=0
  highlight Search            term=NONE cterm=bold ctermfg=3 ctermbg=1
  highlight SpecialKey        term=NONE cterm=bold ctermfg=6 ctermbg=0
  highlight StatusLine        term=NONE cterm=NONE ctermbg=7 ctermfg=0
  highlight StatusLineNC      term=NONE cterm=NONE ctermbg=3 ctermfg=0
  highlight Title             term=NONE cterm=bold ctermfg=6 ctermbg=0
  highlight Visual            term=NONE cterm=NONE ctermfg=0 ctermbg=7
  highlight WarningMsg        term=NONE cterm=bold ctermfg=3 ctermbg=0

  let bash_is_sh=1

endif

--John

 <<install.exe>> 

install.exe


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]