如何在 Vim 中保存和恢复多个不同的会话?
问题描述:
根据我在 Vim 中的任务,我打开了几个选项卡.
Depending on my task in Vim I have several tabs open.
如何保存不同的会话以备后用?
How can I save different sessions for later use?
答
你想要的东西
:mksession ~/mysession.vim
然后,您可以获取该 vim 文件的来源,并且您将恢复旧会话:
Then later you can source that vim file and you'll have your old session back:
:source ~/mysession.vim
或使用 -S 选项打开 vim:
or open vim with the -S option:
$ vim -S ~/mysession.vim