aboutsummaryrefslogtreecommitdiff
path: root/ftplugin
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-02-20 00:33:38 +0800
committerjdhao <jdhao@hotmail.com>2021-02-20 00:33:38 +0800
commitc23846865816f0229caa9b47b0b13786eeb6f6b0 (patch)
tree375535f55df75981c2dae767fd19c320a90b7fbc /ftplugin
parent27a107112be5190bb90d26a57fa013783d24690a (diff)
Adjust quickfix window height automatically
Diffstat (limited to 'ftplugin')
-rw-r--r--ftplugin/qf.vim6
1 files changed, 6 insertions, 0 deletions
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)