[vox-tech] debian/vim question

Peter Jay Salzman vox-tech@lists.lugod.org
Fri, 30 Aug 2002 12:33:06 -0700


begin msimons@moria.simons-clan.com <msimons@moria.simons-clan.com> 
> On Fri, Aug 30, 2002 at 11:21:31AM -0700, Peter Jay Salzman wrote:
> 
>   Is that what you are looking for?
 
DOH!

yeah, thanks!   :-)

>   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.  suppose i
liked C.vim, but for some reason i wanted to add a single change to it.
let's say i wanted to highlight all occurances of the letter "c".

i *could* copy the entire C.vim file into my local directory.  but that
would be very wasteful.

i *could* add my change to the system C.vim file.  i won't even give
reasons why this shouldn't be done because there are too many of them to
list.

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.

in addition, some system syntax files (like perl) *depend* on this
behavior.

> 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.

suppose bash came with the "killme" option.  the default option in
/etc/killing.cfg would be:

set killme="false"

now just suppose someone got really depressed and wanted to die.  he
could put:

set killme="true"

but it would get overridden by the system default; he would have no way
to end it all.

now, for some things, you WANT the system default to be the final word.
particularly when security is involved.  but certainly not for vim!  :-)

pete