Global Find


Since I use Vim when working in rails, I don’t have any nice global find-and-replace across files, but this always helps me out:

grep -R “some text” .

If you run it from the root directory, it does a recursive grep on the contents of every file in the directory and all subdirectories. A big help if I need a quick and dirty way to find all occurrences of certain methods/variables in a project, e.g. when renaming a Rails project.