On Wed, Sep 23, 2009 at 3:38 AM, Christian Brabandt wrote: > > On Wed, September 23, 2009 8:20 am, pansz wrote: >> When you exit, and start vim without command-line arguments, the buffers >> are still there, use :ls list all buffers. >> >> When you start vim with a file name as argument, the buffers are >> cleared, use :ls list only the opened file and my buffer lists are lost >> forever. >> >> Is there anyway to preserve the buffer list when I start vim with a file >> name? Or if anyone can provide ideas on save/restore the buffer list so > > I don't think so. :h 'viminfo' explicitly states that: > > ,---- > | % 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. > | When followed by a number, the number specifies the maximum > | number of buffers that are stored. Without a number all > | buffers are stored. > `----
In a new enough vim, you might be able to hack something together using v:oldfiles. Or... well, this is even more of a hack, in my opinion, but it works. If you have % in your viminfo option, you can do 'vim a b c' and then :qa to get a b and c into your buffer list. The next time you start vim, do it with " vim -c 'args d e' " and your buffer list contains a, b, c, d, and e. It's quite a hack, but it might help. ~Matt --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---