From c23846865816f0229caa9b47b0b13786eeb6f6b0 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 20 Feb 2021 00:33:38 +0800 Subject: [PATCH] Adjust quickfix window height automatically --- ftplugin/qf.vim | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ftplugin/qf.vim diff --git a/ftplugin/qf.vim b/ftplugin/qf.vim new file mode 100644 index 0000000..89b4c1f --- /dev/null +++ b/ftplugin/qf.vim @@ -0,0 +1,6 @@ +" Set quickfix window height, see also https://github.com/lervag/vimtex/issues/1127 +function! AdjustWindowHeight(minheight, maxheight) + execute max([a:minheight, min([line('$'), a:maxheight])]) . 'wincmd _' +endfunction + +call AdjustWindowHeight(5, 15)