[vox-tech] debian/vim question

vox-tech@lists.lugod.org vox-tech@lists.lugod.org
Sat, 31 Aug 2002 07:48:05 -0400


On Fri, Aug 30, 2002 at 12:33:06PM -0700, Peter Jay Salzman wrote:
> begin msimons@moria.simons-clan.com <msimons@moria.simons-clan.com> 
> >   On checking strace of this event I can clearly see vim read in the
> > ~/.vim/syntax/c.vim file then read in the system provided one ... however
> > after making some changes to my local copy I'm certain the local one
> > is overriding the system one.

> > It seems to be wasteful to load both...
> 
> not at all.  syntax files can use the concept of inheritence.
[...]
> the best answer is to load the system C.vim file, then load my local
> C.vim file.  it'll inherit the system settings and make the single
> change i wanted it to.
> 
> > and even then why doesn't seem like it should load the system files second.
> 
> absolutely not.  that's the way it should be!
> 
> all local configurations should be done *after* global ones.  otherwise,
> you might preclude certain types of configurations that users want which
> is not the system default behavior.


  Let me try again.


  vim loads the local user syntax file first.  then loads the system
default syntax file second.  however, the user syntax file appears to 
control behavior overriding what is in the system syntax file.  this
makes it seem like loading the system syntax file is a waste of time. (*)
  I'm not sure if the system file is used at all even though I can see
it being read in... and I don't feel like testing that right now.

  what I expected to see was it load the system file first, then the user 
file second, this would logically allow the user to override a few settings
they wanted to change, without needing to make their changes in a copy of
the whole system syntax file.

    TTFN,
      Mike

*: sample of tested behavior from last night...

user file:
  variable=10

system file:
  variable=20

vim:
  load user file
  load system file
  once vim is ready for user input, value of variable == 10