diff --git a/plugin/startify.vim b/plugin/startify.vim index e2e8e62..8bec79b 100644 --- a/plugin/startify.vim +++ b/plugin/startify.vim @@ -88,10 +88,15 @@ function! s:insane_in_the_membrane() abort setlocal nomodifiable nomodified - nnoremap q :quit nnoremap e :enew nnoremap :normal nnoremap <2-LeftMouse> :execute 'normal '. matchstr(getline('.'), '\w\+') + nnoremap q + \ :if len(filter(range(0, bufnr('$')), 'buflisted(v:val)')) > 1 + \ bd + \ else + \ quit + \ endif if exists('g:startify_empty_buffer_key') execute 'nnoremap '. g:startify_empty_buffer_key .' :enew'