Created
August 13, 2012 22:29
-
-
Save dahu/3344530 to your computer and use it in GitHub Desktop.
Maximize Current Window Without Resizing Quickfix Window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" MaximizeWithoutResizingQuickfix | |
" Barry Arthur, 2012 08 14 | |
" A solution not using vimple | |
function! MaximizeWithoutResizingQuickfix() | |
let qfwnr = get(get(filter(map(range(1,winnr('$')), '[v:val, getwinvar(v:val, "&buftype")]'), 'v:val[1] =~ "quickfix"'), 0, []), 0, -1) | |
let qfh = winheight(qfwnr) | |
wincmd _ | |
if qfwnr != -1 | |
exe qfwnr . "wincmd w" | |
exe "resize " . qfh | |
wincmd p | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment