This is the mail archive of the cygwin 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]
Other format: [Raw text]

gvim not finding syntax.vim


From a tcsh (cygwin) session I'm performing:

% which gvim /bin/gvim

% gvim
Error detected while processing /cygdrive/c/Documents and
line    2:
E484: Can't open file /usr/share/vim/syntax/syntax.vim

I tried linking the syntax sub-dir under vim70 to vim:

% cd /usr/share/vim
% ln -s vim70/syntax
% ls
syntax@  vim70/

But this still didn't work:

% gvim
Error detected while processing /usr/share/vim/vim70/syntax/synload.vim:
line   57:
E580: :endif without :if:   endif
line   58:
E193: :endfunction not inside a function

I checked the piece of code complaining:

33 fun! s:SynSet()
34   " clear syntax for :set syntax=OFF  and any syntax name that doesn't exist
35   syn clear
36   if exists("b:current_syntax")
37     unlet b:current_syntax
38   endif
40   let s = expand("<amatch>")
41   if s == "ON"
42     " :set syntax=ON
43     if &filetype == ""
44       echohl ErrorMsg
45       echo "filetype unknown"
46       echohl None
47     endif
48     let s = &filetype
49   endif
51   if s != ""
52     " Load the syntax file(s).  When there are several, separated by dots,
53     " load each in sequence.
54     for name in split(s, '\.')
55       exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
56     endfor
57   endif
58 endfun

And I see no problem, :(.  This comes from the fact I like
syntax/color to be enabled through my ~/.vimrc:

% cat ~/.vimrc
:set background=dark
:syntax on
:set showmatch
:set smartindent
:set cindent

Please notice the terminal vim is working properly withouth the
manually created link, and out of the box, so I wouldn't know what it
is about gvim that doesn't work properly...

Any help would be greatly appreciated.



Unsubscribe info:
Problem reports:

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