2

I'm wondering, is there a way to open all my *.[c] files on different tabs, but split the window with the corresponding *.[h] file from the command line?

I can split one file as: vim -O file1.c file1.h

or in multiple tabs as: vim -p *.[ch] but I can't split them accordingly

1 Answer 1

1

Try this:

vim -p *.c -c "tabdo split %:r.h"

See:

:help :tabdo
:help filename-modifiers
0

You must log in to answer this question.

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