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?

Ugly as it may be, the following worked for me:

vi -c 'to sp file1' -c 'bel vsp file2' -c 'wincmd b' -c 'bel vsp file4' file3

The items might put in a script and sourced to make it a bit cleaner...something like

bash$ cat four.vim
to sp file1
bel vsp file2
wincmd b
bel vsp file4
wincmd h
e file3
wincmd t
bash$ vim -c 'so four.vim'

Both seem to do the trick. They're kinda hard-coded, to those file names, and those window positions, but they work.

Hope this helps,

-tim





Reply via email to