Skip to content

Instantly share code, notes, and snippets.

@edgardleal
Created April 5, 2017 16:12
Show Gist options
  • Save edgardleal/a7f4d266bb82eaee292fc6bf0803c631 to your computer and use it in GitHub Desktop.
Save edgardleal/a7f4d266bb82eaee292fc6bf0803c631 to your computer and use it in GitHub Desktop.
Auto create a vim session ( mksession ) on current directory when you exit vim , and auto load ( if exists ) the last vim session when you run vim.
autocmd VimLeave * mksession! session.vim
if !empty(glob("session.vim"))
source session.vim
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment