fzf.vim icon indicating copy to clipboard operation
fzf.vim copied to clipboard

how to grep through a passed filelist

Open justrajdeep opened this issue 1 year ago • 0 comments

  • [x] I have fzf 0.30.0 or above
  • [x] I have read through https://github.com/junegunn/fzf.vim/blob/master/README.md
  • [x] I have read through https://github.com/junegunn/fzf/blob/master/README-VIM.md
  • [x] I have read through the manual page of fzf (man fzf)
  • [x] I have searched through the existing issues

Hi @nkouevda

inspired by your solution in https://github.com/junegunn/fzf.vim/issues/1496

what I am trying to do is pass a filelist and let fzf search for things in files in that list

Currently have this mapping where i can pass the filelist :LS <filelist> how do i enhance it to grep in the files in the passed list?

command! -bang -complete=file -nargs=1 LS  call fzf#run(fzf#wrap('ls_filelist', {'source': 'bat <q-args>'}, <bang>0))

Also bonus would be if i can do :LS -q <<string to search>> <<filelist>>

Currently what is do is

bat filelist | xargs \rg <<search>> -l

which is i want to replace achieve in vim ... with interactive fzf search

TIA

justrajdeep avatar Jan 04 '24 19:01 justrajdeep