Vi/Vim restore opened files

You can map using :mksession and :source to a set of keys for easy saving and restoring. Here’s an example from my .vimrc that uses F2 and F3:

map <F2> :mksession! ~/vim_session <cr> " Quick write session with F2
map <F3> :source ~/vim_session <cr>     " And load session with F3

Leave a Comment

tech