Add :SClose

References #141.
This commit is contained in:
coachshea 2015-01-05 16:06:20 -05:00 committed by Marco Hinz
parent 6d6ff5f927
commit b89114f359
2 changed files with 11 additions and 0 deletions

View file

@ -227,6 +227,16 @@ function! startify#session_save(...) abort
endif
endfunction
" Function: #session_close {{{1
function! startify#session_close() abort
if exists('v:this_session') && filewritable(v:this_session)
call startify#session_write(fnameescape(v:this_session))
let v:this_session = ''
endif
call startify#session_delete_buffers()
Startify
endfunction
" Function: #session_write {{{1
function! startify#session_write(spath)
let ssop = &sessionoptions

View file

@ -30,6 +30,7 @@ augroup END
command! -nargs=? -bar -complete=customlist,startify#session_list SSave call startify#session_save(<f-args>)
command! -nargs=? -bar -complete=customlist,startify#session_list SLoad call startify#session_load(<f-args>)
command! -nargs=? -bar -complete=customlist,startify#session_list SDelete call startify#session_delete(<f-args>)
command! -nargs=0 -bar SClose call startify#session_close()
command! -nargs=0 -bar Startify call startify#insane_in_the_membrane()
nnoremap <silent><plug>(startify-open-buffers) :<c-u>call startify#open_buffers()<cr>