Closed lispercat closed 3 months ago
See https://github.com/junegunn/fzf.vim/issues/1533#issuecomment-2015075571
Since you asked about ag, not rg, I would do something like this:
command! -complete=file -bang -nargs=* Ag
\ call fzf#vim#grep("ag --filename --nogroup --column --color -- ".<q-args>, fzf#vim#with_preview(), <bang>0)
But it seems ag doesn't print the file name when you specify a single file even when --filename
is given, so that will not work correctly.
ag --filename --nogroup --column --color -- fzf README.md
Maybe it's a stupid question but I didn't find the answer anywhere. How do I execute "ag sometext --java" using Ag: command? When I just say ":Ag sometext --java" it concatenates --java into the text search