6
2
I left some files opened in gVim, and hibernated my machine.
Unfortunately, there was some error, and I lost my gVim session.
Is it possible to do like modern browsers nowadays (like Firefox), that after "crashing" (not exiting in normal ways), showing a "Restore last session" dialog in my gVim?
Do you mean associating :mksession each time I use :w for example? – Somebody still uses you MS-DOS – 2010-06-04T13:28:26.583
1
just as a hint (because :mksession is correct): http://www.vim.org/scripts/script.php?script_id=2010
– akira – 2010-06-04T19:35:46.320yep that's what I meant – UncleZeiv – 2010-06-06T16:22:15.733
I did a different solution, but using a similar concept that you suggested: autocmd VimLeavePre * mksession! .vim.sess I think it would be a good idea to you to edit your answer and add the VimLeavePre approach! http://jaredforsyth.com/blog/2010/apr/9/vim-crash-recovery/
– Somebody still uses you MS-DOS – 2010-06-08T13:05:13.280Enabling just that autocmd and adding -S to the gVim startup command will enable automatic session management! Thanks guys. – Merijn – 2011-05-12T06:15:41.937