On 2008-10-07, Bob Hiestand <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 7, 2008 at 2:41 PM, Gary Johnson <[EMAIL PROTECTED]> wrote:
> 
> > My point was not whether to use expand('%') or expand('%:p'), but
> > that it was silly to use expand() at all in this situation.  My
> > point was, why do
> >
> >   au BufRead * if expand('%:p') =~ '^/some/path/' | set ft=somefiletype | 
> > endif
> >
> > when
> >
> >   au BufRead /some/path/* set ft=somefiletype
> >
> > will suffice?
> 
> ... at least for myself, because the OP claimed that it didn't work,
> and I had the time to throw out a quick suggestion but not to research
> whether what you claim is true.
> 
> Is it?  Have you tested?

Yes.  Before I posted.

When the OP claimed it didn't work, a number of people jumped to the 
conclusion that the pattern "/some/path/*" was not valid and 
suggested alternative patterns and tests.  Since "/some/path/*" is a 
valid autocommand pattern, then something else is wrong.

Regards,
Gary


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to