Open dudicoco opened 7 months ago
Yeah this can be indeed, something you can try at least is to disable the preview which can be annoying if it's slow while you're typing things. Other than that I think the only solution would be to move the actual search and replace to an external program, maybe sed
or a some custom program. Currently it's all done through nvim functions and commands.
Maybe one question, do you have any feeling for if it's slower compared to if you would have done the same search and replace manually through nvim. And if yes, what commands did you use?
usually I would do such search and replace via telescope which uses fd for searching (very fast) and then use native vim cfdo/cdo %s
.
And that's faster? If so, I wonder if it would be faster if muren
would use cfdo
instead of looping over the buffers to apply the search and replace in lua. However that was not what my intuition said when first writing it.
@AckslD the issue occurs in the search phase, before performing the actual replacement. perhaps muren should use fd and rg to search?
I see, yeah currently muren
uses :vimgrep
to find the relevant files to do the search-replace operation on. This is such that vim-pattern syntax can be used. But maybe this should be configurable/toggleble? It could then use :grep
instead and the user can configure whichever grepprg
they want.
sounds like a good solution.
When attempting to search replace across a large repository the plugin takes forever, listing each file it iterates over very slowly.
It seems that it is currently unusable with large repositories.