> -----Original Message-----
> From: Tim Chase [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 28, 2006 5:03 PM
> 
> > When I start vim from the command line and provide a 
> filename, how can
> > I prevent a default scratch buffer from also being opened?
> 
> I'm not sure exactly what you mean by a "default scratch 
> buffer".
> 
> If you supply a filename on the command line
> 
>       bash$ vi file.txt
> 
> you only have one buffer:
> 
>       :ls
>        1 %a   "file.txt"    line 1
> 
> If you don't supply a file name, Vim will create an empty 
> buffer for you
> 
>       bash$ vi
>       :ls
>         1 %a   "[No File]"   line 1
> 
> However, if you don't supply a filename, and you *don't* 
> want to have the empty buffer, there's nothing for vim to 
> do.  The snarky answer would be
> 
>       vim -c "q"
> 
> :)

There is if you set up vim to restore the last session.  But even
in this case vim will create a scratch buffer in addition to the
buffers you last edited.  To prevent this from happening I start
vim with the following command:

gvim +bd

-- 
JP

Reply via email to