On Thu, Oct 31, 2002 at 07:12:06PM +0000, Philip Martin wrote:
> Kevin Pilch-Bisson <kevin@pilch-bisson.net> writes:
>
> > The last I proposed it, it was shot down, because the settings would have to
> > be in every source file, since vim won't load another file from a modeline
> > (for security reasons). The concern was that if the coding style changed, it
> > would require a change to every source file in the repos.
>
> I don't know much about Vim, but is there a way to use an autocmd to
> recognise a particular pattern in the file, and then execute commands
> from a particular file?
>
> > At this point, can we decide that the coding style is not likely to change
> > very much, and add the modelines. (I'll supply a patch if no one dissents).
>
> This is perfectly reasonable in my view.
>
Yes, that can be done, but only in a .vim file. Modelines can't do
autocommands, all they can do is set options directly. So currently we
provide and svn-dev.vim file for people to source if they choose, but by
adding modelines to the source files, we can just set the coding style to
match, without people having to do anything other than open the file.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson http://www.pilch-bisson.net
"Historically speaking, the presences of wheels in Unix
has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- application/pgp-signature attachment: stored
Received on Thu Oct 31 20:32:12 2002