
I would like to be able to use ':find blah*.c'. The other thing, :find also does not like wildcard characters, they are expanded before the :find is executed. Yes, I have been using construct very similar to yours, the trouble was that :find opens first file of a given name it finds, without telling you that there are other two. With :find foo.cpp it's open the file on Vim. Well, is on the shell $PROJECTDIR defined the include recursive all directories. Here is a version the exclude subversion directory: I think, it will be better to use vimgrep for find, than it works also under windows. Let l:input=input("Which ? (CR=nothing)\n")

I tried to use try-catch block around and it seems to work. Vim internal pager has quit bound to 'q' (see :help more-prompt), but this will stop my original script. When I try the :Explore command it gives error: E77: Too many file namesĪdding a quit button is not a bad idea.

Hitting the on a matching file opens the file, of course. This command will show the current match number out of the total quantity of matches in the status line, and one may move forwards and backwards in the matching files list. There's also the :Explore **/ command, available via netrw.vim. The only caveat (and it's a major one) is that it's very slow. h files in the directory (and it's subdirectories) two directories up from the current directory: You can load an arbitrary list of files with :args, for instance:
#Windows gvim list directory contents windows#
" replace above line with below one for gvim on windows " Find file in current directory and edit it. You may also use wildchars (whatever find(1) knows). If there is more than one match, it will present you a selection: :Find whatever.c - this opens the file "src/core/whatever.c" For globpath() I was unable to make it work with the '**' construction, so that it would look into all subdirectories under current directory. :find works nearly as I need, but unfortunatelly it opens the first file of a given name without telling me that there are more.

I was trying to find if there is some solution directly in Vim, and haven't found one. If I know some of the text in the file, I could always recursively use 'vimgrep', but for searching on filenames alone I have been using: I'm working with big, nested workspaces and often I don't remember the exact path to the file, only its filename or part of the filename. Tip 1234 Printable Monobook Previous Next
