vim - Reload complete session if there are no modified buffers -
i have been using mksession
save session files a,b,c in tabs.
:mksession! $home/mysession.vim
and load session using
" enables <leader>s reinitialize session nmap <leader>s :source $home/mysession.vim<cr>
but there times when want refresh 3 files a,b,c (may have been bouncing around looking @ other files in saved state). if run command twice, files a,b,c,a,b,c twice. how can modify above session command clear unmodified buffer tabs , reload a,b,c files?
you can clear existing buffers via
:1,999bdelete
first.
alternatively, have plugins session.vim - extended session management vim; seems handle reload of session well.
Comments
Post a Comment