Always create new buffer
Nowadays :enew won't create a new buffer if the current buffer is empty. So this won't create an unused, empty, unnamed buffer.
This commit is contained in:
parent
113655717e
commit
0a81f95abf
|
@ -43,11 +43,8 @@ endfunction
|
||||||
|
|
||||||
" Function: #insane_in_the_membrane {{{1
|
" Function: #insane_in_the_membrane {{{1
|
||||||
function! startify#insane_in_the_membrane() abort
|
function! startify#insane_in_the_membrane() abort
|
||||||
if &insertmode
|
" Handle vim -y, vim -M.
|
||||||
return
|
if &insertmode || !&modifiable
|
||||||
endif
|
|
||||||
|
|
||||||
if &modified
|
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -59,6 +56,8 @@ function! startify#insane_in_the_membrane() abort
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
noautocmd enew
|
||||||
|
|
||||||
silent! setlocal
|
silent! setlocal
|
||||||
\ bufhidden=wipe
|
\ bufhidden=wipe
|
||||||
\ colorcolumn=
|
\ colorcolumn=
|
||||||
|
|
|
@ -60,7 +60,7 @@ command! -nargs=? -bar -complete=customlist,startify#session_list SLoad
|
||||||
command! -nargs=? -bar -bang -complete=customlist,startify#session_list SSave call startify#session_save(<bang>0, <f-args>)
|
command! -nargs=? -bar -bang -complete=customlist,startify#session_list SSave call startify#session_save(<bang>0, <f-args>)
|
||||||
command! -nargs=? -bar -bang -complete=customlist,startify#session_list SDelete call startify#session_delete(<bang>0, <f-args>)
|
command! -nargs=? -bar -bang -complete=customlist,startify#session_list SDelete call startify#session_delete(<bang>0, <f-args>)
|
||||||
command! -nargs=0 -bar SClose call startify#session_close()
|
command! -nargs=0 -bar SClose call startify#session_close()
|
||||||
command! -nargs=0 -bar Startify noautocmd enew | call startify#insane_in_the_membrane()
|
command! -nargs=0 -bar Startify call startify#insane_in_the_membrane()
|
||||||
command! -nargs=0 -bar StartifyDebug call startify#debug()
|
command! -nargs=0 -bar StartifyDebug call startify#debug()
|
||||||
|
|
||||||
nnoremap <silent><plug>(startify-open-buffers) :<c-u>call startify#open_buffers()<cr>
|
nnoremap <silent><plug>(startify-open-buffers) :<c-u>call startify#open_buffers()<cr>
|
||||||
|
|
Loading…
Reference in a new issue