Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I start gvim.exe, it starts with the usual vim start window. But there are previous buffers hidden in background.

How I can disable this behavior?

share|improve this question
up vote 4 down vote accepted

Unless you have any plugin applying its magic, this is probably caused by the % value in 'viminfo':

% When included, save and restore the buffer list. If Vim is started with a file name argument, the buffer list is not restored. If Vim is started without a file name argument, the buffer list is restored from the viminfo file. Buffers without a file name and buffers for help files are not written to the viminfo file.

share|improve this answer

When you start Vim without a file or directory ($ vim), your bufferlist should have only one item, an empty, unnamed buffer.

When you start Vim with a file ($ vim filename), your bufferlist (:ls) should have only one item, the buffer corresponding to that file.

Vim doesn't load buffers unless you tell it to do so. If you get additional items in any of the above scenarii you must examine your vimrc and, eventually see if some plugin is not responsible for this.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .