Re: Split window automatically when opening 2 or 3 files
Tony Mechelynck <antoine.mechelynck <at> gmail.com>
2010-03-01 07:54:31 GMT
On 03/01/10 21:39, Gary Johnson wrote:
> On 2009-12-31, Brock Henry wrote:
>> I want to have Vim (on Windows), automatically split the window if I open two
>> files (using right-click explorer integration - Open in Single VIM Window).
>> Actually, a new right-click integration that did this (Open in split VIM
>> Window), would be perfect.
>> Is there anyway to do this?
> I don't have a Windows machine handy at the moment so I can't test
> this, but it seems to me that you should be able to test in your
> _vimrc for the presence of more than one file name in the argument
> list with the argc() function, then if the number of arguments is
> greater than 1, execute ":all". See
> :help argc()
> :help :all
Note that if you set 'winheight' to a high value in your vimrc in order
to make window sizes change dynamically (and the current window always
be the biggest one), you must use ":all" _before_ setting 'winheight',
otherwise it won't work.
It is generally agreed that "Hello" is an appropriate greeting because
if you entered a room and said "Goodbye," it could confuse a lot of
-- Dolph Sharp, "I'm O.K., You're Not So Hot"
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