Comments on: Vim Sessions http://www.terminally-incoherent.com/blog/2013/04/29/vim-sessions/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Luke Maciak http://www.terminally-incoherent.com/blog/2013/04/29/vim-sessions/#comment-31784 Tue, 30 Apr 2013 17:11:52 +0000 http://www.terminally-incoherent.com/blog/?p=14269#comment-31784

@ Mitlik:

Well, it is in my .vimrc which is on github. I haven’t really gotten around to making it into a plugin or anything.

The console vim can usually also take the –servername parameter so as long as you launch it with a name you can later re-store from session. I also did a little trick when the file name of my session is based either on the servername you pass on the command line or on a user defined variable g:sessionname. I also created a command Ses which sets that variable. So at any time I can just go :wall, :Ses FOO and :q.

Then later I can reopen it by doing gvim –servername FOO or alternatively vim -S ~/.vimsessions/FOO.session.vim.

Reply  |  Quote
]]>
By: Mitlik http://www.terminally-incoherent.com/blog/2013/04/29/vim-sessions/#comment-31776 Tue, 30 Apr 2013 14:14:17 +0000 http://www.terminally-incoherent.com/blog/?p=14269#comment-31776

I’ve been wanting something like this in Vim. I haven’t gotten around to reading the documentation as fully as I’d like, so thanks for the great info. Is this by any chance committed to your git repo for vim files?

Also, do you have a handy trick like this for tmux? Having sessions saved across the rare reboot would be great.

Reply  |  Quote
]]>