Monday, April 11, 2016

Re: How to open from bash file A and B in vertical split and file C in second tab?

2016-04-11 8:32 GMT+03:00 h_east <h.east.727@gmail.com>:
> Hi Michał,
>
> 2016-4-11(Mon) 13:12:27 UTC+9 Michał Urban:
>> Hi,
>>
>> How to open from bash file A and B in vertical split and file C in second tab?
>
> $ vim -O A B -c "tabedit C" -c "tabfirst"

I would suggest using

vim -O2 A B C -c 'tab sbuffer 3' -c tabfirst

@h_east's code makes C different from A B in the following fashion:

1. Buffers for A and B are created before vimrc is loaded.
2. A and B will be listed in argv(), C will not.

Note though that in both cases first two windows are created in the
different initialization stage then third one (the one created by
`:tabedit` or `:tab sbuffer`: tab page always contains at least one
window) and for that window and the first one (when it is switched to
by tabfirst) more autocmd events are run then usual.

>
> Please see following documents.
> :help -O
> :help -c
> :help :tabedit
> :help :tabfirst
>
> --
> Best regards,
> Hirohito Higashi (a.k.a. h_east)
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: