Skip to content

Instantly share code, notes, and snippets.

@dahu
Created August 13, 2012 22:29
Show Gist options
  • Save dahu/3344530 to your computer and use it in GitHub Desktop.
Save dahu/3344530 to your computer and use it in GitHub Desktop.
Maximize Current Window Without Resizing Quickfix Window
" 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