Thursday, July 12, 2012

Re: how to resize window (width) continuously ?

On 7/11/2012 9:16 PM, chris wrote:
> Excerpts from [ Andy Wokula ] //// On [2012-07-11 19:33:24 +0200]:
>
>> 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 one is better. Also how to use this way to adjust window width ?
>
>> --
>> Andy
>
>> --
>> 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
>


is that so complicated? I use this in my vimrc:

map <C-left> zH
map <C-right> zL

so ctrl+left/right will contineously move right margin of curr window
left/right.

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