Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

restore vim session without opening [no name] buffer

Tags:

vim

I use the following viminfo setting in my .vimrc to restore my last session.

set viminfo='10,\"100,:20,%,n~/.viminfo

It works as expected, except for one detail: When I start vim with no command line parameters, it restores all my buffers, but it also opens a [no name] buffer with the vim version number, etc. and starts me in this [no name] buffer. I then :bd this buffer and continue on my way.

How can I restore my session without opening the [no name] buffer?

I tried replacing my entire .vimrc with a single set viminfo=... line like the one above, but the problem persists.

I am using vim 7.3. I am not using gvim.

like image 505
jsp Avatar asked Mar 09 '26 16:03

jsp


1 Answers

put this line in your _vimrc:

set shortmess+=I

Tested this out successfully in vim on Windows 7

like image 162
Dan Schnau Avatar answered Mar 12 '26 10:03

Dan Schnau



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!