New option: g:startify_session_before_save

Execute commands before saving the session. Useful for cleaning up.

Closes #222.
This commit is contained in:
Marco Hinz 2016-06-01 17:40:44 +02:00
parent cee51f4a9a
commit 3bd270a3f2
2 changed files with 19 additions and 1 deletions

View file

@ -274,6 +274,10 @@ function! startify#session_write(spath)
execute 'silent! argdelete' fnameescape(arg)
endif
endfor
" clean up session before saving it
for cmd in get(g:, 'startify_session_before_save', [])
execute cmd
endfor
let ssop = &sessionoptions
set sessionoptions-=options