Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.