Opening multiple files in vim (using bash)

Who does not know the problem? One is browsing through the file system and wants to open all files in vim, which have a specific file extension. For example you want to open all JAVA files of the current directory and all of its subdirectories. Here is a simple bash-based solution using the find-command :

vim -p `find -name \*java -type f`
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s