mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 09:03:43 -05:00
Ag w/o argument
@@ -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-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
|
- `CTRL-A` to select all matches and list them in quickfix window
|
||||||
|
- `Ag` without argument will list all the lines
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
function! s:ag_to_qf(line)
|
function! s:ag_to_qf(line)
|
||||||
@@ -146,8 +147,9 @@ function! s:ag_handler(lines)
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! -nargs=1 Ag call fzf#run({
|
command! -nargs=* Ag call fzf#run({
|
||||||
\ 'source': 'ag --nogroup --column --color "'.escape(<q-args>, '"\').'"',
|
\ 'source': printf('ag --nogroup --column --color "%s"',
|
||||||
|
\ escape(empty(<q-args>) ? '^' : <q-args>, '"\')),
|
||||||
\ 'sink*': function('<sid>ag_handler'),
|
\ 'sink*': function('<sid>ag_handler'),
|
||||||
\ 'options': '--ansi --expect=ctrl-t,ctrl-v,ctrl-x '.
|
\ 'options': '--ansi --expect=ctrl-t,ctrl-v,ctrl-x '.
|
||||||
\ '--multi --bind ctrl-a:select-all --color hl:68,hl+:110',
|
\ '--multi --bind ctrl-a:select-all --color hl:68,hl+:110',
|
||||||
|
|||||||
Reference in New Issue
Block a user