From 1639fe5f8a1182faba9ea364d14b8d0cfe457daf Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Sat, 27 Apr 2013 14:58:23 +0200 Subject: [PATCH] make 'q' trigger either :bd or :quit --- plugin/startify.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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'