qftoggle is a minimalistic plugin that allows you to toggle Vim/Neovim's
QuickFix and Location List windows. It also provides replacements for Vim's
:cnext
-related commands that wrap to the other side of the error lists when
trying to move past either ends of the lists.
qftoggle can be installed like any other typical plugin. For example, using the plugin manager vim-plug:
Plug 'seandewar/vim-qftoggle'
Or by simply using Vim 8's packages feature (:help packages
):
packadd vim-qftoggle
qftoggle defines the following commands:
:Ctoggle
for toggling the QuickFix list window.
Optionally accepts a command modifier, e.g::botright Ctoggle
.:Ltoggle
; behaves as above, but for the Location list of the current window.:Cnext
,:Cprevious
, and:CNext
; like Vim's:cnext
,:cprevious
, and:cNext
commands, but can wrap around each end of the QuickFix list.
Optionally accepts a count argument for repeating, e.g::5Cnext
.:Lnext
,:Lprevious
, and:LNext
; behaves as above, but for the Location list of the current window.
In addition to these commands, qftoggle provides normal mode mappings for use in your configurations. These plugin mappings are not automatically mapped to any keys for you; you can map them to keys yourself by placing the following in your vimrc, for example:
nmap <Leader>c <Plug>(qftoggle_toggle_quickfix)
nmap <Leader>l <Plug>(qftoggle_toggle_loclist)
nmap ]c <Plug>(qftoggle_quickfix_next)
nmap [c <Plug>(qftoggle_quickfix_previous)
nmap ]l <Plug>(qftoggle_loclist_next)
nmap [l <Plug>(qftoggle_loclist_previous)