saving/restoring buffers not working in vim

倖福魔咒の 提交于 2019-12-25 06:12:23

问题


I'm using vim 7.2 in iterm2 (Snow Leopard). I'd like to save/restore buffers between vim sessions automatically, and added this line to my vimrc:

set viminfo+=%

Now, I open a couple of files and quit vim. I expect them to be there, but I get the home screen. This is the output of :set viminfo

viminfo='100,<50,s10,h,%

Am I missing any step here?


回答1:


What you need is reading :help mksession.

And the Vim Wiki(a) has some tips to use it automatically.



来源:https://stackoverflow.com/questions/9055535/saving-restoring-buffers-not-working-in-vim

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!