Use :SS! to force overwriting a potentially existing session

This can be used to avoid the following prompt when using :SSave

  "Session already exists. Overwrite?  [y/n]"

References 
This commit is contained in:
Marco Hinz 2017-11-21 20:13:48 +01:00
parent 22ccf58613
commit 95d182979e
No known key found for this signature in database
GPG key ID: 1C980A1B657B4A4F
2 changed files with 4 additions and 4 deletions
autoload

View file

@ -200,7 +200,7 @@ function! startify#session_load(...) abort
endfunction
" Function: #session_save {{{1
function! startify#session_save(...) abort
function! startify#session_save(bang, ...) abort
if !isdirectory(s:session_dir)
if exists('*mkdir')
echo 'The session directory does not exist: '. s:session_dir .'. Create it? [y/n]'
@ -240,7 +240,7 @@ function! startify#session_save(...) abort
endif
echo 'Session already exists. Overwrite? [y/n]' | redraw
if nr2char(getchar()) == 'y'
if a:bang || nr2char(getchar()) == 'y'
call startify#session_write(fnameescape(spath))
echo 'Session saved under: '. spath
else