From e328b6724ff1b12e862e02356fc75050929776ce Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 26 Oct 2017 08:49:54 +0200 Subject: [PATCH] Added some window height things FIX: SetWinMinHeight no longer crashes when argument < 0 FIX: - no longer crashes when already at winminheight=0 ADD: New command Equal makes all windows equally big (and sets minwinheight to 0 in the process, use - to reset them) --- vimrc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 4751361..00996a0 100644 --- a/vimrc +++ b/vimrc @@ -215,10 +215,19 @@ function! s:GrepOperator(type) endfunction " Window Height stuff +command! Equal call Equal() +function! Equal() + set winminheight=0 + set winheight=1 + set equalalways! + set equalalways! +endfunc function! SetWinMinHeight(num) execute "set winminheight=".0 - execute "set winheight=".(a:num+1) - execute "set winminheight=".a:num + if a:num>=0 + execute "set winheight=".(a:num+1) + execute "set winminheight=".a:num + endif execute "set winheight=".9999 endfunc call SetWinMinHeight(2)