Saturday, February 26, 2011

Re: Window resizing

On Feb 26, 4:13 pm, David Kahn <d...@structuralartistry.com> wrote:
> I am having some trouble following (or getting the expected result)
> following the documentation in resizing a window:
>
> :res[ize] -N                    *:res* *:resize* *CTRL-W_-*
> CTRL-W -    Decrease current window height by N (default 1).
>         If used after |:vertical|: decrease width by N.
>
> :res[ize] +N                    *CTRL-W_+*
> CTRL-W +    Increase current window height by N (default 1).
>         If used after |:vertical|: increase width by N.
>
> I can use :res [+/-] N fine. But I cant get the ctrl w + and ctrl w - to
> work. I am on a macbook and using the + and - keys to the left of the delete
> key (so I have to press shift additionally to get the + key). Does anyone
> use this successfully? I guess I could map :res +1 and :res - 1 to a
> function key....

I assume you are using vim in terminal, but I think this also works
for vim-app and MacVim. I am using terminal vim.

These work fine for the "window" height, that is the vim window WITHIN
the limit of the terminal window.

ctrl-w -
ctrl-w + (yes use shift =)

These work for changing the width WITHIN the limit of the terminal
window.

ctrl-w <
ctrl-w >

If you want the vim and terminal "window" to change height use:

" set an absolute size
set lines=44

" one side makes you smaller, the other taller

" make the window 4 lines smaller
set lines-=4

" make the window 4 lines taller
set lines+=4

-Bill

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