aboutsummaryrefslogtreecommitdiff
path: root/.vim/keybindings.vim
diff options
context:
space:
mode:
Diffstat (limited to '.vim/keybindings.vim')
-rw-r--r--.vim/keybindings.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/.vim/keybindings.vim b/.vim/keybindings.vim
index 7a68992..b76eb27 100644
--- a/.vim/keybindings.vim
+++ b/.vim/keybindings.vim
@@ -43,3 +43,13 @@ function! s:split_line_text_at_cursor()
let text_before_cursor = (col('.') > 1) ? line_text[: col('.')-2] : ''
return [text_before_cursor, text_after_cursor]
endfunction
+
+function! s:toggle_quickfix()
+ if empty(filter(getwininfo(), 'v:val.quickfix'))
+ copen
+ else
+ cclose
+ endif
+endfunction
+
+nnoremap <silent> <leader>c :call s:toggle_quickfix()<cr>