tags:

views:

87

answers:

3

How can I open in a split window multiple files. One split for each file if I'm not being clear.

I want to do something like. :sp app/views/*.erb and have the ~7 files all open in their own split windows.

A: 

What happens when you do a

:sf app/views/*.erb

from within vim?

Rob Wells
Eeep. "Too many file names" error )-:
Rob Wells
+3  A: 

Not actually from within vim, but perhaps you can run vim like this:

vim -o app/views/*.erb
depesz
perfect. works great.
Vijay Dev
A: 

Had to whip up a function.

  fun! OpenSplits(dir)
    for f in split(glob(a:dir), '\n')
      execute "sp " f
    endfor
  endfun
lagsalot