Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm on a server, editing some files, and I'm using an account shared with others. I'd like to know if there's a way to use find to get a list of files to edit, just like :grep does, but for files. I know ctrlp.vim, but I'd rather not install a plugin on a server that is not mine.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can use backtick expansion in an :edit command. Example taken from :help backtick-expansion:

:e `find . -name ver\\*.c -print`

If you get 'Too many file names', just use :n or :args instead of :e

Also, from the § above in the help, starstar-wildcard is enabled, so you may use

:n **/*.c
share|improve this answer
    
+1, didn't know the backtick expansion was available here, but I tried and it does not work: I get 'Too many file names'... any idea? EDIT: I found a solution. –  greg0ire Apr 9 '13 at 11:42
    
Yeah, :edit takes only one argument, but e.g. :argadd works for multiple matches. –  Ingo Karkat Apr 9 '13 at 11:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.