Skip to content

Instantly share code, notes, and snippets.

@jacoblockard99
Last active August 11, 2018 15:07
Show Gist options
  • Save jacoblockard99/b6575018c434632d96a96520af58c45e to your computer and use it in GitHub Desktop.
Save jacoblockard99/b6575018c434632d96a96520af58c45e to your computer and use it in GitHub Desktop.
A script to find files and run them with vim.
#!/bin/bash
if [[ $1 = -* ]]
then
echo "Finding files by $1..."
find . $1 $2 -exec vim {} \;
else
echo "Finding files by name..."
find . -name $1 -exec vim {} \;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment