background
So I have the silver search thing going:
" The Silver Searcher
if executable('ag')
" Use ag over grep
let &grepprg = "ag --nogroup --nocolor --ignore wiki --ignore tags"
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
endif
" bind \ (backward slash) to grep shortcut
command -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw!
nnoremap \ :Ag<SPACE>
when I click on \ I get the prompt to search, which is great, it looks like this:
I got three questions:
how do I dismiss the bottom bar? I'm not sure what that action is called.. ideally I would connect that to some keyboard binding
How can i make it so that when i click on a file (or perform some keybinding on a file in the list below).. it automatically jumps to the file AND dismiss the bottom bar?
how can I (with a keyboard shortuct) make the bottom bar higher and smaller? sometimes that's useful when i got tonnes of results
many thanks
:cwindow
command. Read the help at:h quickfix
to see what commands are available (like e.g.:cclose
to close it)