aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2024-10-30 08:47:47 +0000
committerJuan J. Martinez <jjm@usebox.net>2024-10-30 08:51:28 +0000
commit56d61a587606bd76eff7a947bac27808b0262c27 (patch)
treede01dd92556287f8b38544bd33f9b426817b3899
parentcc05d094940d0ed47317cf6c396ae48f63598913 (diff)
downloaddotnvim-56d61a587606bd76eff7a947bac27808b0262c27.tar.gz
dotnvim-56d61a587606bd76eff7a947bac27808b0262c27.zip
toggle quickfix window
-rw-r--r--init.vim11
1 files changed, 11 insertions, 0 deletions
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 <leader>s :set spell! spelllang=en_gb<CR>
+" open/close quickfix
+function ToggleQuickfix()
+ if empty(filter(getwininfo(), 'v:val.quickfix'))
+ copen
+ else
+ cclose
+ endif
+endfunction
+
+map <leader>q :call ToggleQuickfix()<cr>
+
" show tabs and EOL whitespace
:set list listchars=tab:»·,trail:·