[lug] vi question

John Karns jkarns at csd.net
Sat Jan 20 12:02:02 MST 2001


On Sat, 20 Jan 2001, Sean Reifschneider uttered:

> My .vimrc includes:
> 
>    if &term =~ "xterm"
>       if has("terminfo")
>          "set t_Co=16
>          set t_Co=2
>          set t_AB=[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm
>          set t_AF=[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm
>       else
>          "set t_Co=16
>          set t_Co=2
>          set t_Sf=[3%dm
>          set t_Sb=[4%dm
>       endif
>    endif
> 
>    set background=dark
>    if &t_Co > 1
>       syntax on
>    endif
>    highlight PreProc ctermfg=5 cterm=bold    "cyan
>    highlight Comment ctermfg=1               "red
>    highlight String ctermfg=2                "green
>    highlight Normal guibg=Black guifg=White

When I include this in my .vimrc then edit .vimrc again, the editor
displays all kinds of control char's:

^[[96mversion ^[[95m5.0
^[[96mset ^[[35mnocompatible
^[[96mlet cpo_save^[[96m=&cpo
^[[96mset ^[[35mcpo=B
^[[96mmap! ^[[96m<xHome^[[96m> ^[[94m<Home>

in contrast to my usual .vimrc as follows:

version 5.0
set nocompatible
let cpo_save=&cpo
set cpo=B
map! <xHome> <Home>

Is it just my configuration, or is that intended?

----------------------------------------------------------------------
John Karns                                              jkarns at csd.net

"Those who cast the vote decide nothing; Those who count the vote decide
everything." - Joseph Stalin 






More information about the LUG mailing list