How to close the search result window?
Leviathan1995 opened this issue · 4 comments
Leviathan1995 commented
I bind the F10
to open vim-grepper
, but how can I close the result window by a map command?
Leviathan1995 commented
ping @mhinz
lbonn commented
The result window is just a regular quick list window, this question is out of scope for vim-grepper I would say.
Personally, I use https://github.com/romainl/vim-qf:
nmap <silent> <Leader>eq <Plug>(qf_qf_toggle)
adam505hq commented
@Leviathan1995 You can simply use :cclose
or example below to Toggle Search.
function! ToggleSearch()
if empty(filter(getwininfo(), 'v:val.quickfix'))
:Grepper
else
cclose
endif
endfunction
nnoremap <C-f> :call ToggleSearch()<cr>
Leviathan1995 commented
@adam505hq Thanks!