How to "search for a file and send the result to vim" in one command?

I used:

find ~/web_project -name "config_*.php" -print | xargs vim 

In vim, everything is fine. But, if the output is vim, the terminal freezes.

My env: osx 10.6, macvim

+4
source share
2 answers
 vim $(find ~/web_project -name "config_*.php") 

Often I want to check my find command first, so

 find ~/web_project -name "config_*.php" vim $(!!) 
+4
source

You can try (checked on 10.5).

 $ vim `find ~/web_project -name "config_*.php"` 
+2
source

All Articles