How to open and split multiple files

前端 未结 5 1934
不思量自难忘°
不思量自难忘° 2021-01-30 10:45

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

5条回答
  •  悲哀的现实
    2021-01-30 11:30

    Had to whip up a function.

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

提交回复
热议问题