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 often find myself finding files in a shell, and then wanting to edit all of them in a single gvim instance.

But the following: find . -name foo -print0 | xargs -0 gvim opens a gvim instance for every file found (gvim 'find . -name foo' doesn't work aswell).

How can I open all of them in a single instance? (no splits or tabs needed)

EDIT: I narrowed it down to simply running the command gvim file1 file2 opens 2 instances. Can't find anything in gvim help on how to make it open one.

share|improve this question
    
The command gvim file1 file2 will open one instance of gvim. What makes you think it opens two? –  garyjohn Nov 29 '10 at 15:38
    
it was something wrong with my .bashrc that made it not work. thanks –  Idan K Nov 29 '10 at 15:44
add comment

1 Answer

up vote 2 down vote accepted

vim `find . -name foo`

share|improve this answer
    
that works with vim but not with gvim –  Idan K Nov 29 '10 at 15:33
    
Try 'gvim -U NONE files'. This will not read initialization files, perhaps there is something that causes this behavior. –  JooMing Nov 29 '10 at 15:38
1  
ah! it wasn't something with my .vimrc but you got me thinking and it was something related to my .bashrc. thanks! –  Idan K Nov 29 '10 at 15:43
    
@Gilles: I know that, and thanks for reminding :) I suggested this command to rule out the possibility that xargs executed gvim twice. –  JooMing Nov 30 '10 at 9:36
add comment

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.