For your vi example, try:
$ vi $(find -name foobar)
This will execute the find command in parentheses first and vi will execute on that output. It will work as long as there is not more than one "foobar" in your search path. If there is more than one foobar, it will open the first one found. That's basic bash shell programing if you want to delve into it more.
As noted above, find is frequently used with the exec command; in addition it is also frequently used with the xargs command:
If you go through the above articles you will start to get some sense on how to string commands together using the output of find.