From 56d61a587606bd76eff7a947bac27808b0262c27 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Wed, 30 Oct 2024 08:47:47 +0000 Subject: toggle quickfix window --- init.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/init.vim b/init.vim index ba71321..ee0a617 100644 --- a/init.vim +++ b/init.vim @@ -57,6 +57,17 @@ colorscheme gruvbox-material " toggle spell check map s :set spell! spelllang=en_gb +" open/close quickfix +function ToggleQuickfix() + if empty(filter(getwininfo(), 'v:val.quickfix')) + copen + else + cclose + endif +endfunction + +map q :call ToggleQuickfix() + " show tabs and EOL whitespace :set list listchars=tab:»·,trail:· -- cgit v1.2.3