From ec0032348db078e8525deeedeb2f0323ce561239 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 17 Apr 2014 12:35:49 -0400 Subject: [PATCH] Closing help with q or the same keys that opened it are disabled in vimdiff since they'd kill the whole shebang, and the tagbar won't auto open in vimdiff either --- vim/config/keyboard.vim | 10 ++++++---- vim/config/plugins.vim | 7 +++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 1f64b3e..d8b07d5 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -527,10 +527,12 @@ autocmd FileType gundo map h k "help - autocmd FileType help map q ':q' - autocmd FileType help map ?? ':q' - autocmd FileType help map ?> ':q' - autocmd FileType help map ?< ':q' + if !&diff + autocmd FileType help map q ':q' + autocmd FileType help map ?? ':q' + autocmd FileType help map ?> ':q' + autocmd FileType help map ?< ':q' + endif "markdown: launch table of contents instead of the tagbar autocmd FileType mkd map ':Toch' diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index 95f305c..3f5a6d1 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -114,8 +114,11 @@ if !exists("g:autostarttagbar") let g:autostarttagbar=0 endif - if (g:autostarttagbar == 1) - autocmd VimEnter * nested :call tagbar#autoopen(1) + + if !&diff + if (g:autostarttagbar == 1) + autocmd VimEnter * nested :call tagbar#autoopen(1) + endif endif let g:tagbar_sort=0