[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: changelog format



On Tuesday 21 April 2009, Bill Crawford wrote:
> On Tuesday 21 April 2009 15:42:36 Iain Arnell wrote:
> > -  autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
> > +  if executable("rpmdev-newspec")
> > +    autocmd BufNewFile *.spec exe "rpmdev-newspec -o - ".bufname("%")
> > +  else
> > +    autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
>
> Please don't make vim do yet another bunch of stat() calls at startup to
> look for this </whine>

The above doesn't seem to be working for me ("E492: Not an editor command: 
rpmdev-newspec -o - foo.spec") but if someone can tweak vim to simply always 
use the stdout of (pseudocode):

rpmdev-newspec -o - bufname("%") 2>/dev/null || cat 
/usr/share/vim/vimfiles/template.spec

... for new *.spec I think that'd accomplish it without adding any startup 
burden.

                                                                                                                              


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]