I have a pair of Bash functions:

function ff() { find . -path -o -name $@ -print; }
function fvim() { ff "$@" -exec vim {} \;; }

Which is helpful for finding a file and opening it right away in Vim. What I'd like to do is either extend this or create a similar function which I can call from within Vim (searching from my current directory, probably just using 'ff') to open the found file in a new buffer of that Vim instance.

Can anyone help with this?

1 Answer 1


With Vim alone:

:set path=.,,**
:find foo.txt

The filename can't contain wildcards, but :find does have TAB completion.

Alternatively there are many excellent plugins that can do that and a lot more, f.i. Unite, CtrlP, or fzf.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .