amitoz
amitoz

Reputation: 323

Vimgrep: How to create an arglist using find command?

I want to use vimgrep to refactor some code in a python project. Let say that this is the project structure:

./
  nlp/
  test/
  setup.py
  README.md

Both the nlp and test folder contains some python files. Assuming that my pwd is the ./ directory. I would like to include all the files from this command:

find . -type f -name "*.py"

To be included in my args list in vim, like this:

:args `find . -type f -name "*.py"

And then search the pattern using the vimgrep using:

:vimgrep /pattern/g ##

The problem is I cannot create the args list, it is giving me some metacharacter error in the vim.

NOTE: Though I can do this:

:args `find . -type f`

EDIT: The exact error is:

E79: Impossible de développer les métacaractères "`find . -type f -name" [Nouveau fichier]

Which means unable to develop to metacharacters.

Upvotes: 0

Views: 292

Answers (0)

Related Questions