I have a percent sign in my viminfo string, so my buffer list is saved when I exit vim, and restored when I restart. When I start vim with a filename argument, the buffer list isn't restored, which is what is described in the vim help. However, it's still saved when I exit, which overwrites my longer buffer list. This seems strange behavior. Is there a way to configure vim so I don't lose my saved buffer list when I start vim with a filename argument? The best workaround I can think of is to conditionally add % to my viminfo string in vimrc, when there is no filename argument.

  • I think you have the right idea with manipulating 'viminfo' and that would be the path with the least friction. – B Layer Apr 20 '20 at 10:01
  • I tried it, and my idea didn't work. My workaround now is to use gvim for most editing, and configure it to use a different viminfo file than vim run in a terminal window. – Paul CyberCitizen Apr 24 '20 at 21:10
  • Can you add the details of that to the question? I can try it and see what luck I have and perhaps provide alternate approach. – B Layer Apr 24 '20 at 23:54
  • This could be a task best suited for session. You may want to give a shot to Tpope's obesssion – Biggybi Jan 27 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.