Closed pirj closed 4 years ago
I can't see any advantage over the native implementation of LeaderF.
One advantage is that after running rg and outputting results in the quicklist I can then do cfdo
to replace values in those files.
Or is there a way to replace values currently that I am not aware of?
btw I would much rather have a replace function with LeaderF's native implementation then to load them in the quickfix list
Hi.
It is not an option like --quickfix
or--location
, but implements output by mapping in the result window.
https://github.com/tamago324/LeaderF/commit/def838ad6c4f7de922c7e6a411864a4a034a78ff
You can output the result of filtering.
Q
(quickfix list) and L
(location list) can be output in normal
mode.
What do you think? Would you let us know what you think.
This sounds usefull!
Thanks! Is this what you were looking for?
If I understand correctly this would allow me to: Put all filtered results directly in the Quick or Location results (And possibly select specific results and put them in) , which is what I needed for search and replace. Now I could do: Leaderf rg, filter stuff, hit Q and then 'cfdo %s/something/somethingelse/`
It would be even more seamless if Leaderf would output the current filter of results into a register so I could prepopulate the replace regex with that.
If I understand correctly this would allow me to: Put all filtered results directly in the Quick or Location results (And possibly select specific results and put them in) , which is what I needed for search and replace. Now I could do: Leaderf rg, filter stuff, hit Q and then 'cfdo %s/something/somethingelse/`
Yes. That understanding is correct!
It would be even more seamless if Leaderf would output the current filter of results into a register so I could prepopulate the replace regex with that.
It looks good to save in a register.
However, it seems difficult because you can enter multiple search patterns like Leaderf rg -e "hello" -e "world"
.
If multiple search patterns are specified, you may be able to combine them with |
Hmmm good point. Alright then, thanks for the effort! Hope it will be in soon.
On Thu, 23 Jan 2020 at 10:52, tamago324 notifications@github.com wrote:
If I understand correctly this would allow me to: Put all filtered results directly in the Quick or Location results (And possibly select specific results and put them in) , which is what I needed for search and replace. Now I could do: Leaderf rg, filter stuff, hit Q and then 'cfdo %s/something/somethingelse/`
Yes. That understanding is correct!
It would be even more seamless if Leaderf would output the current filter of results into a register so I could prepopulate the replace regex with that.
It looks good to save in a register. However, it seems difficult because you can enter multiple search patterns like Leaderf rg -e "hello" -e "world".
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Yggdroot/LeaderF/issues/447?email_source=notifications&email_token=ACT5CT3U5GVUHUCUTUXM5HLQ7FSGLA5CNFSM4J6LCD22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJWZLRI#issuecomment-577607109, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACT5CT66WMCFWPRABSZFLE3Q7FSGLANCNFSM4J6LCD2Q .
https://github.com/thinca/vim-qfreplace is a very useful plugin. if you like please get.
The results of
rg
output are shown in a decidated window which is different from the default:grep
/:lgrep
behaviour. The convenience of the latter two is that:cnext
/:cprevious
/:cfirst
/:clast
/... are available, and that makes--recall
the default, and--next
/--previous
redundant as default Vim's commands already exist.Would it be possible to add
--quickfix
/--location
as an option torg
's window position option?PS Thanks for LeaderF, it's by far more usable than other fuzzy finders.