Thursday, July 12, 2012

Re: how to resize window continuously ?

On Thu, July 12, 2012 10:19, Andy Wokula wrote:
> Am 12.07.2012 08:05, schrieb Christian Brabandt:
>> On Wed, July 11, 2012 19:33, Andy Wokula wrote:
>>> Am 06.06.2012 03:18, schrieb stardiviner:
>>>> In vim, how to adjust window height or width continuously ?
>>>> For example,
>>>> press `C-w -` and `-` and `-` to decrease window height again
>>>> and
>>>> again,
>>>> But this seems can not work in Vim.
>>>>
>>>> So is there a good and simple way to do this ?
>>>
>>> There is a way:
>>>
>>> set timeoutlen=3000 " 1 second times out too soon
>>> set showcmd " mode prefix in lower right corner
>>>
>>> nmap<C-W>+<C-W>+<SID>winheight
>>> nmap<C-W>-<C-W>-<SID>winheight
>>> nn<script> <SID>winheight+<C-W>+<SID>winheight
>>> nn<script> <SID>winheight-<C-W>-<SID>winheight
>>> nmap<SID>winheight<Nop>
>>>
>>> See also submode and tinymode.vim (the latter by me).
>>
>> This doesn't do anything for me, except displaying _winheight in the
>> lower right corner.
>
> Yes, `_winheight' is from the incomplete <SID>winheight mapping.
>
> So after :split and `<C-W> -' you type another `-' and the window
> doesn't change its size?

Oh yes, it does. I somehow thought, the Vim frame window should change
the size not the window within Vim.

regards,
Christian

--
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

No comments:

Post a Comment