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"

:)

Perhaps you could elaborate a bit as to what you're seeing as "wrong" and what would remedy it.

-tim



Reply via email to