曾经蜡笔没有小新2017-05-16 16:44:25
設定檔加上以下內容:
" Go to last file(s) if invoked without arguments. autocmd VimLeave * nested if (!isdirectory($HOME . "/.vim")) | \ call mkdir($HOME . "/.vim") | \ endif | \ execute "mksession! " . $HOME . "/.vim/Session.vim" autocmd VimEnter * nested if argc() == 0 && filereadable($HOME . "/.vim/Session.vim") | \ execute "source " . $HOME . "/.vim/Session.vim"
參考:Open the last edited file
伊谢尔伦2017-05-16 16:44:25
如果使用terminal的話,推薦用下邊兩個alias:
alias lgvim='gvim -c "normal '\''0"'
alias lvim='vim -c "normal '\''0"'
這裡有詳細的介紹
我比較喜歡用mru插件