One history trick I use a lot that most people don't seem to know about is the !$ variable, which refers to the last argument of the previous command. It's basically a bash pronoun. !! is the entire previous command which is occasionally useful with find:
find . -name foo
vi $(!!)