AckslD / muren.nvim

Multiple replacements in neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Freeze when I try to active some options

t1gu1 opened this issue · comments

When I try to active dir ou files my terminal freeze.
I have to close and reopen everything.

image

Other option seems toggle correctly.

Is there some prerequisite package to install in the OS to get it works?

It seems to happend only if I wrote a patterns or replacement before I toggle the dir or files option.

image

Oh, directly when I active dir option and I write something in the patterns, it freeze too.

I finally find why.

My project is too "big" and it search everywhere.
I simply change the files argument to: src/**/* and it was ok.

Is there a way to exclude files?
Like /ios/Pods/,/vendor/bundle/,.history,node_modules,dist,.git,build/

Hi @t1gu1, if you're doing recursive replacements in a directory it can be useful to disable preview while typing the replacements and setting the options since that will do the replacements for each keystroke.

Regarding your question to exclude files, currently muren calls out to :vimgrep but maybe we can optionally instead call :grep which the user can configure to use rg or anything and custom configs to ignore eg .gitignore.

But the syntax for patterns for both the search-term and files would then potentially have to be different.

Considering the .gitignore file would be a nice enhancement.
I would'nt had any issues with that.



Some Ideas


Maybe it could be an idea to remove de default value of the files options.

  • When there is nothing, it will list all the files except the one in the .gitignore with that command git ls-files.
  • If the git ls-files list nothing, it will default to the */**

You can try it with a: vimgrep thingsToSearch `git ls-files` | cw


Maybe add a call to action to make the search?
e.g. when you pass from insert mode to normal mode it call the search.

In the options, it could have a live preview option instead of a preview and the preview could be always on with the call action.