junegunn / fzf.vim

fzf :heart: vim
MIT License
9.51k stars 581 forks source link

how to grep through a passed filelist #1519

Open justrajdeep opened 6 months ago

justrajdeep commented 6 months ago

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