>> From: [email protected] [mailto:[EMAIL PROTECTED] >> On
Behalf Of Erik Falor
>> Sent: 16 April 2008 23:37
>> To: [email protected]
>> Subject: Re: Vertical split issue
>> 
>> On 4/16/08, Zdenek Sekera <[EMAIL PROTECTED]> wrote:
>>
>> No problem when I try 'vim -O a b' this puts both files
>> side by side as it should.
>> I was surprised to see 'vim -O a a' (note the same file)
>> it doesn't put them in a split window. Is this expected?
>> On the other hand
>>
>> vim a
>> :vsp a   (inside vim)
>>
>> will put correctly the same file 'a' side by side.
>>
>> ---Zdenek


> $ vim -o a a   #this doesn't  open file a in two horizontal splits
>
> $ vim -p a a   #this doesn't  open file a in two tabpages
>
> Given that this behavior is consistant across three command-line 
> options, and without having searched for the code, I'd say that
> Vim does this on purpose.  

You are right, it seems consistent, even 'vim -d a a' behaves
the same (why would anyone do THAT!). 

> I would suspect that opening the same
> file in two windows isn't a real common need, especially if each 
> view of the file starts at the very same line.

Actually I use it quite often to look at two different parts of
the same code (for comments, definitions, etc...), I find it
very useful to speed up the coding. But clearly YMMV.

But it still seems to me an oversight. If you think one can
do 'vim a a a a' which will line up 4 times the same file
for editing, one can also ask oneself "what's for".
Surely for nothing but it works. So by the same token IMHO,
'vim -O a a' should also work. Or both not to work, whatever,
just to be consistent. But that looks like splitting the hair.

> If you really want to do this, though, may I suggest:
>
> $ vim a -c "vert sb"

Sure, but I'm quite happy to open it again from inside
vim (why does this work when it's the same file?), so the
workaround (rather a trick) is simple.

No problem.

---Zdenek


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Raspunde prin e-mail lui