This is a request for a small change.
I'd like the quickfix window height to be len(getqflist()) when it is less than ten.
could you maybe change:
to something like this?
if a:force || (g:vimtex_quickfix_mode > 0 && l:errors_or_warnings)
call s:window_save()
let s:qf_errors = len(getqflist())
if s:qf_errors < 10
execute 'botright cwindow' s:qf_errors
else
botright cwindow
endif
...
I don't want to enforce this, sorry. I think this should be a user setting. I personally use the following myself in a personal ftplugin/qf.vim file:
augroup quickfix_autocmds
autocmd!
autocmd BufReadPost quickfix call AdjustWindowHeight(2, 30)
augroup END
function! AdjustWindowHeight(minheight, maxheight)
execute max([a:minheight, min([line('$') + 1, a:maxheight])])
\ . 'wincmd _'
endfunction
This sets the minimum and maximum height of the quickfix window in a general
manner that works everywhere, not only for LaTeX projects.
indeed. thanks for the tip!
No problem :)
Most helpful comment
I don't want to enforce this, sorry. I think this should be a user setting. I personally use the following myself in a personal
ftplugin/qf.vimfile:This sets the minimum and maximum height of the quickfix window in a general
manner that works everywhere, not only for LaTeX projects.