Loading ...
Sorry, an error occurred while loading the content.

Re: feature proposal: ":tabe file1 fileN" and ":sp file1 fileN"

Expand Messages
  • A.J.Mechelynck
    ... What does already work is, for instance ... or (untested; v7 only) command! -nargs=* complete=file -bar Split call s:Split( ) function!
    Message 1 of 2 , Aug 1, 2006
    • 0 Attachment
      Rodolfo Borges wrote:
      > I wanted to open a new tab, to edit three files, splited in their own
      > three windows.
      >
      > I tried ":tabe file1 file2 file3", vim complained "Only one file name
      > allowed".
      >
      > Then I tried ":tabnew" and ":sp file1 file2 file3", it also didn't work.
      >
      >
      > My proposal:
      >
      > Open N tabs with
      > :tabe file1 file2 ... fileN
      >
      > Open a new tab, with N splited windows with
      > :tabe -s file1 file2 ... fileN
      >
      > Split N windows with
      > :sp file1 file2 ... fileN
      >
      >
      > What do you think?
      >

      What does already work is, for instance

      :sp file1 | sp file2 | sp file3

      or (untested; v7 only)

      command! -nargs=* complete=file -bar Split
      \ call s:Split(<f-args>)
      function! s:Split(...)
      if a:0 == 0
      split
      else
      let i=1
      while i <= a:0
      exe "split" a:000[i-1]
      endwhile
      endif
      endfunction


      Best regards,
      Tony.
    Your message has been successfully submitted and would be delivered to recipients shortly.