From 1b4b7304531dd671e5f7521abb1efe8a3d4c6dab Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Mon, 3 Nov 2014 02:48:29 -0500 Subject: [PATCH] Improve logic used when opening a help split --- vim/config/after.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/config/after.vim b/vim/config/after.vim index a795f00..cef1bd6 100644 --- a/vim/config/after.vim +++ b/vim/config/after.vim @@ -51,8 +51,8 @@ endif autocmd BufEnter,FileType extradite setlocal number "enable line numbers in extradite autocmd BufEnter,FileType help* setlocal nocursorline "remove the horizontal cursor line - "load help as a vertical split (sidebar) using one third of the window - autocmd BufEnter,FileType help* wincmd L|wincmd h|vs|wincmd =|q|wincmd l + "load help in an 80 char vertical split if the window is wider than 140 characters, otherwise load horizontally at 33% of the height + autocmd BufEnter,FileType help* if &columns >= 140|wincmd L|vertical resize 80|else|wincmd j|sp|wincmd =|q|wincmd k|endif "settings for buffers in diff mode autocmd VimEnter,FilterWritePre * if &diff|setlocal nofoldenable|endif