Two vims: one has syntax working, one doesn't

Two vims: one has syntax working, one doesn't

Post by Russell Hoov » Tue, 08 Aug 2000 04:00:00



I have vim set up on 2 different ISPs (panix and shore.net).  One (panix)
has color syntax working fine, the other (shore.net) doesn't.  I'm trying
to fix the one that doesn't.  Here's some info on both (a lot, actually
 -- hope it's not overkill), for anyone who can help:

------------------------------------------------------------------------
    ****  vim on panix  ****  (syntax working):

Output of :version --

VIM - Vi IMproved 5.7 (2000 Jun 24, compiled Jul 12 2000 16:06:02)

+autocmd -browse +builtin_terms +byte_offset +cindent +cmdline_compl
+cmdline_info +comments +cryptv -cscope +dialog_con +digraphs
-emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
-osfiletype +find_in_path +fork() -GUI -hangul_input +insert_expand
-langmap +linebreak +lispindent +menu +mksession +modify_fname +mouse
-mouse_dec -mouse_gpm -mouse_netterm +mouse_xterm -multi_byte -perl
-python +quickfix -rightleft +scrollbind +smartindent -sniff
+statusline +syntax +tag_binary +tag_old_static -tag_any_white -tcl
+terminfo +textobjects +title +user_commands +visualextra
+viminfo +wildignore +wildmenu +writebackup +X11 -xfontset
-xim +xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/pkg/vim-5.7/libdata//vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H    -I/usr/local/include -g -O2
-Wall -I/usr/X11R6/include -I/us
r/local/include
Linking: gcc -L/usr/local/lib -o vim  -L/usr/local/lib -L/usr/X11R6/lib    -lXt
-lX11  -lncurses

Also, on panix, I have a .termtype file defined as "vt220", and  no termcap file
or terminfo directory.  Panix is running NetBSD 1.4.2.  In my .zprofile I have
"export TERM=vt220".  In my .vimrc, I have "set term=xterm-vt220".  Also in my
.vimrc is the following:

"   Set the colors for vim on "xterm":
  if &term=="builtin_xterm"

    set t_Co=8
    set t_AB=?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm
    set t_AF=?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm
  endif

if has("syntax")
     " The following sources the main syntax file,
     " ie. "$VIM/syntax/syntax.vim", see ":help :syn-on":
  syntax on
     hi Comment         ctermfg=grey
     hi Constant        ctermfg=white
     hi Cursor          ctermfg=red
     hi Directory       ctermfg=cyan
     hi ErrorMsg        ctermfg=green         ctermbg=red
     hi IncSearch       ctermfg=white         ctermbg=red
     hi LineNr          ctermfg=darkblue
     hi ModeMsg         ctermfg=white         ctermbg=red
     hi MoreMsg         ctermfg=green         ctermbg=red

"   All nontext items (line numbers, tabs, tildes,
"   & EOL spaces) are dark blue (*very* helpful):
     hi NonText         ctermfg=4
     hi Search          ctermfg=white         ctermbg=red
     hi Signature       ctermfg=red           ctermbg=black
     hi StatusLine      ctermfg=darkblue      ctermbg=brown
     hi StatusLineNC                          ctermbg=darkblue
     hi Title           ctermfg=darkcyan
     hi Visual          ctermfg=green         ctermbg=red
     hi WarningMsg      ctermfg=green
     hi WildMenu        ctermfg=black         ctermbg=yellow
endif

(the above set up has syntax working fine.)
-------------------------------------------------------------------

    ****  vim on shore.net  ****  (syntax *not* working):

Output of :version --

VIM - Vi IMproved 5.4 (1999 Jul 25, compiled Aug 12 1999 07:08:43)

+autocmd +browse +builtin_terms +byte_offset +cindent +cmdline_compl
+cmdline_info +comments +cryptv -cscope +dialog_con_gui +digraphs
-emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
-osfiletype +find_in_path +fork() +GUI_Motif -hangul_input +insert_expand
-langmap +linebreak +lispindent +menu +mksession +modify_fname +mouse
-mouse_dec -mouse_gpm -mouse_netterm +mouse_xterm -multi_byte -perl
+quickfix -python -rightleft +scrollbind +smartindent -sniff +statusline
+syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo
+textobjects +title +user-commands +visualextra
+viminfo +wildignore +wildmenu +writebackup +X11
-xfontset -xim +xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/home/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H  -DUSE_GUI_MOTIF
-I/usr/dt/include -g -O2 -Wall
Linking: gcc  -o vim -L/usr/dt/lib -R /usr/dt/lib   -lXext -lXm -lXt
-lXt -lX11 -ltermlib

Set-up on shore.net is mostly the same as panix: .termtype file
defined as "vt220"; no termcap or terminfo files; OSTYPE is Solaris2.7;
my .zprofile has "export TERM=vt220"; my .vimrc has
"set term=xterm-vt220"; the restof my .vimrc is the same as on panix,
except for the path the main syntax file.

I've been trying to figure this out for a few weeks now with no luck.
Any suggestions appreciated.

--

  City cops & state cops & national guard & bureau cops & tv cops & movie cops
   & uniform & plainclothes cops & riot cops & cops on top of cops on top of
        cops on top of cops: it's a world full of cops.     -- Paleface

 
 
 

Two vims: one has syntax working, one doesn't

Post by Smyle » Tue, 08 Aug 2000 04:00:00



Quote:> I have vim set up on 2 different ISPs (panix and shore.net).  One
> (panix) has color syntax working fine, the other (shore.net) doesn't.
> I'm trying to fix the one that doesn't.

Please can you specify what you mean by "doesn't".  Do you get an error
message saying that syntax highlighting isn't specified?  Do you get
underlined and inverted monochrome highlights but you'd like it in
color?  Or is it just as though you'd typed :echo rather than :sy on?

Are you connecting to both ISPs in the same way?  (Telnet, SSH?)  Can
you get colour output from anything else (colour ls or escape sequences
in your prompt or anything)?

Smylers
--
Random Rebuttal:  It has now been established that Mark Owen and Dale
Winton were definitely not gladly faking hiding from a hockey stick
last week.  A * tumble drier was not involved.

 
 
 

Two vims: one has syntax working, one doesn't

Post by Russell Hoov » Tue, 08 Aug 2000 04:00:00


On Mon, 7 Aug 2000 09:47:54 +0100 (BST),

uttered something along the lines of:

Quote:>> I have vim set up on 2 different ISPs (panix and shore.net).  One
>> (panix) has color syntax working fine, the other (shore.net) doesn't.
>> I'm trying to fix the one that doesn't.
>Please can you specify what you mean by "doesn't".  Do you get an error
>message saying that syntax highlighting isn't specified?

Sorry.  No (see below).

Quote:>Do you get underlined and inverted monochrome highlights but you'd
>like it in color?

Yes -- I get the underlined and bold monochrome (and inverted
highlights on html files).  And would like this to be in color.

Quote:>Or is it just as though you'd typed
>:echo rather than :sy on?

Entering either of these commands has no effect on the vim that
is displaying only in monochrome.

Quote:>Are you connecting to both ISPs in the same way?  (Telnet, SSH?)

Yes -- I SSH to both of them.

Quote:>Can you get colour output from anything else (colour ls or
>escape sequences in your prompt or anything)?

Yes.  I get color ouput from 'color ls' which is working fine.
I have color working fine in my zsh prompt, and color is working
in mutt (linked against slang).  This is all on my shore.net
account (actually all these are working on both accounts).
But vim (on shore.net) is only in monochrome.

Thanks for any suggestions.

--

  City cops & state cops & national guard & bureau cops & tv cops & movie cops
   & uniform & plainclothes cops & riot cops & cops on top of cops on top of
        cops on top of cops: it's a world full of cops.     -- Paleface

 
 
 

Two vims: one has syntax working, one doesn't

Post by Smyle » Wed, 09 Aug 2000 04:00:00



> On Mon, 7 Aug 2000 09:47:54 +0100 (BST), Smylers

> > Do you get underlined and inverted monochrome highlights but you'd
> > like it in color?

> Yes -- I get the underlined and bold monochrome (and inverted
> highlights on html files).  And would like this to be in color.

OK, so syntax highlighting is there, and from your :version output
+terminfo is there too.

Quote:> > Can you get colour output from anything else (colour ls or escape
> > sequences in your prompt or anything)?

> Yes.  <Snip>

So colour in `Vim' definitely should be possible.

Quote:> Thanks for any suggestions.

This is clutching at straws (I'm not very good with terminal stuff --
where's TE*ey when you need him?), but what happens if you set term
to xterm or to vt220 (rather than xterm-vt220)?  Possibly in combination
with that, does setting t_Co to 8 make any difference?

Smylers
--
Random Rebuttal:  It should be made clear that there is absolutely no
truth in those rumours concerning Billie Piper, Melvin Bragg, a welly,
and a taupe Rubik's cube.

 
 
 

Two vims: one has syntax working, one doesn't

Post by Thomas Dicke » Wed, 09 Aug 2000 04:00:00



> This is clutching at straws (I'm not very good with terminal stuff --
> where's TE*ey when you need him?), but what happens if you set term

I was out of town (happens occasionally).

Quote:> to xterm or to vt220 (rather than xterm-vt220)?  Possibly in combination
> with that, does setting t_Co to 8 make any difference?

xterm/vt220 generally don't describe color.  vim has some fallbacks
(t_Co, etc.), which are documented in its online help to supplement
the terminfo/termcap, though I don't agree that they are necessary.

Quote:>>Set-up on shore.net is mostly the same as panix: .termtype file
>>defined as "vt220"; no termcap or terminfo files; OSTYPE is Solaris2.7;
>>my .zprofile has "export TERM=vt220"; my .vimrc has
>>"set term=xterm-vt220"; the restof my .vimrc is the same as on panix,
>>except for the path the main syntax file.

It sounds as if the .vimrc is finding the entry for xterm-vt220 (which
does describe color), on one machine, while it is not present on the
other, so replacing that with 'vt220' "works" except that it doesn't
do color.  The applicable lines from comparing with
        infocmp vt220 xterm-vt220
are:

        colors: NULL, 8.
        pairs: NULL, 64.
        op: NULL, '\E[39;49m'.
        setab: NULL, '\E[4%p1%dm'.
        setaf: NULL, '\E[3%p1%dm'.

(though vim may use the setb/setf entries, omitted here since they're long)

It's usually simpler to set $TERMINFO and install the proper (for the
given terminfo emulator) terminfo entry.

--

http://www.veryComputer.com/
ftp://dickey.his.com

 
 
 

1. OLEobject problem - setup code works fine with one app but doesn't work with another

Following setup code works fine with one app but doesn't work with another.
Has any body got any idea?

-Kubilay-

 IF .NOT. SELF:oDCMETE:CreateEmbedding("VtChartLib.VtChart.5","114700E1")
 ELSE
 ENDIF

SELF:oDCMETE:InitAutoObject()

//following lines fine with one app but doesn't work with another
oDCMETE:AllowUserChanges:=FALSE
oDCMETE:ColumnCount:=3
oDCMETE:RowCount:=26
oDCMETE:ChartType:=3
....

I get the following error and after "ignore"'s chart shows ok.

Error message:
--------------
Error Code:  33 [ DATA TYPE ERROR ]
Subsystem: BASE
Function: =>PTR
Argument: NIL
Requested type: PTR
CallStack:
VCFIRSTIMPRESSION50CHART:ALLOWUSERCHANGES:ASSIGN (Line: 19)
NEWWINDOW1:POSTINIT (Line: 14)
NEWWINDOW1:INIT (Line: 17)
APP:START (Line: 44)

2. Stopping Notes server problem

3. Got two XBOX's for Christmas One with Live one w/o

4. 'Temporary' email server with same hostname

5. Help!: Layering two PDF's into one && Using one PDF as a template

6. MultiFinder GS

7. Insert in 2 tables - Second insert fails then first, then second, then first...

8. justify text

9. Stuff doesn't work only in one room

10. my first procedure and tada... it doesn't work

11. Formula One 3.1.3 Build 1 spreadsheet gives 'Invalid formula syntax' error

12. VIM: Mapping a Change till find character eg c/["'<] doesn't work

13. Two SAS Openings/One Consulting One Full Time