[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Adding vim comment string to files

From: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2001-09-06 20:05:28 CEST

On Thu, Sep 06, 2001 at 01:47:05PM -0400, Kevin Pilch-Bisson wrote:
> On Thu, Sep 06, 2001 at 01:50:56PM -0400, Garrett Rooney wrote:
> >
> > i'm sure the vim users among us (myself included) would love to attain
> > equal status to the emacs people, but rather than having the comments
> > in each file couldn't we have a single comment that has vim source one
> > file with all the settings? i think .vim files have the ability to
> > source other files, so i imagine it might be possible to do such a
> > thing from a vim comment.
>
> I'm still investigating. How's this, if I can find such a way I'll check it in,
> otherwise I'll leave it.

Unfortunately, it isn't possible to have it load an external file. From the
VIM documentation (section Automatically setting options)

'No other commands than "set" are supported, for security reasons (somebody
might create a Trojan Horse text file with modelines).'

The lines to be added are:

 * vim:ts=4:sw=4:expandtab:tw=80:fo=tcroq
 * vim:isk=a-z,A-Z,48-57,_,.,-,>
 * vim:cino=>1s,e0,n0,f0,{.5s,}0,^-.5s,=.5s,t0,+1s,c3,(0,u0,\:0

Which are fairly uniqe and easy to sed, if there is a need to change them.

What I would like is for someone else who uses VIM to look at them, and see if
they match Subversion coding style. (I think they do, based on my tests, but
thought I would check with someone else).
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Kevin Pilch-Bisson http://www.pilch-bisson.net
> "Historically speaking, the presences of wheels in Unix
> has never precluded their reinvention." - Larry Wall
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 Sat Oct 21 14:36:40 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.