m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

Ag w/o argument

Junegunn Choi
2015-07-13 01:47:09 +09:00
parent 86cb9e6914
commit 29628c900f

@@ -118,6 +118,7 @@ command! FZFLines call fzf#run({
- `CTRL-X`, `CTRL-V`, `CTRL-T` to open in a new split, vertical split, tab respectively.
- `CTRL-A` to select all matches and list them in quickfix window
- `Ag` without argument will list all the lines
```vim
function! s:ag_to_qf(line)
@@ -146,8 +147,9 @@ function! s:ag_handler(lines)
endif
endfunction
command! -nargs=1 Ag call fzf#run({
\ 'source': 'ag --nogroup --column --color "'.escape(<q-args>, '"\').'"',
command! -nargs=* Ag call fzf#run({
\ 'source': printf('ag --nogroup --column --color "%s"',
\ escape(empty(<q-args>) ? '^' : <q-args>, '"\')),
\ 'sink*': function('<sid>ag_handler'),
\ 'options': '--ansi --expect=ctrl-t,ctrl-v,ctrl-x '.
\ '--multi --bind ctrl-a:select-all --color hl:68,hl+:110',