Hi Raphael,

On Thu, 11 May 2006 13:22:54 +0200 (MEST)
"Raphael Brunner" <[EMAIL PROTECTED]> wrote:

> dear users
> 
> How can I open four files (eg: file1.txt, file2.txt, file3.txt and
> file4.txt) for a view as following:
> 
> VIM
> ------------------------------------
> ¦file1             ¦file2          ¦
> ¦                  ¦               ¦
> ¦                  ¦               ¦
> ¦                  ¦               ¦
> ¦                  ¦               ¦
> ------------------------------------
> ¦file3             ¦file4          ¦
> ¦                  ¦               ¦
> ¦                  ¦               ¦
> ¦                  ¦               ¦
> ¦                  ¦               ¦
> ------------------------------------
> 
> I tried this: with a modeline with :sp - but it don't works
> and a script with -o and -O, but also this don't works.
> Has anyone a good idea?
> 
> Thanks a lot for your help.
> Raphael
> 

Sessions might be what your after here. (:h sessions)
Once you have the layout how you'd like it (ie as you've
illustrated above):

   :mksession /path/to/save/to/sessionName.vim

Doesn't help you initially (see Tims reply) but next time you open vim
you can:

   :so /path/to/save/to/sessionName.vim

and the session will be restored.

Doing this you can have the windows different sizes or in vim 7
files 1,2,3,4 on one tab, files 5,6 on another, and file 7 on yet
another. All windows and tabs will be restored when you source
sessionName.vim. (Bram's a Genius!)

One other thing if you change the session and wish to save it, you need
to use:

  :mksession! /path/to/save/to/sessionName.vim
  note the ! to overwrite
  
Of course there nothing stopping you saving it as a different session
if that's preferred.


cheers,


-- 
Mark

Reply via email to