Provides mappings for toggling the quickfix window without losing focus of the
active/previously focused window.
Handles the following cases:
- quickfix window is not visible in the current tab
The toggle function will display the quickfix window at the bottom of the screen, with the width filling the width of the scree; - quickfix window is visible in the current tab
2.1 quickfix is not in focus
The toggle function will close the quickfix window, maintaining the current focused window.
2.2 quickfix is currenly in focus
The toggle function will close the quickfix window and the focus will be taken by the previously focused window;
Mappings
F5 -> toggle quickfix window (no matter what window is currently in focus)
q -> when quickfix window is in focus it will close it
- Available F5 key for the mapping to work.
When F5 is pressed the quickfix window is shown/hidden. Pressing 'q' in the quickfix window, will close it.
Opening the quickfix window, then closing it will reset the focused window to the top-left one. By using the mappings provided in this plugin, this issue is no longer present.
Vundle
Plugin 'mihaicristiantanase/vim-toggle-qf'
vim-plug
Plug 'mihaicristiantanase/vim-toggle-qf'
Pathogen
git clone https://github.com/mihaicristiantanase/vim-toggle-qf ~/.vim/bundle/vim-toggle-qf