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
2 changed files with 5 additions and 6 deletions
|
@ -43,11 +43,8 @@ endfunction
|
|||
|
||||
" Function: #insane_in_the_membrane {{{1
|
||||
function! startify#insane_in_the_membrane() abort
|
||||
if &insertmode
|
||||
return
|
||||
endif
|
||||
|
||||
if &modified
|
||||
" Handle vim -y, vim -M.
|
||||
if &insertmode || !&modifiable
|
||||
return
|
||||
endif
|
||||
|
||||
|
@ -59,6 +56,8 @@ function! startify#insane_in_the_membrane() abort
|
|||
endfor
|
||||
endif
|
||||
|
||||
noautocmd enew
|
||||
|
||||
silent! setlocal
|
||||
\ bufhidden=wipe
|
||||
\ colorcolumn=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue