On Sun, 29 Mar 2009 00:01:11 +0900, Lech Lorens <[email protected]> wrote:
> The attached patch enhances the behaviour of CTRL-W_CTRL-_ in visual mode.
>
> If CTRL-W_CTRL-_ is pressed in visual mode, Vim will try to change the
> height of the current window to match the visual selection and scroll
> the text so that all of the selection is visible.
>
> I didn't know whether to document it in visual.txt or window.txt...
> Left it in window.txt along with documentation for the original
> CTRL-W_CTRL-_.

It's possible to implement the feature only by Vim script.
For example, I use the following settings for a long time:

        vmap <C-w><C-_>  <C-w>_
        vnoremap <silent> <C-w>_  :<C-u><C-r>=line("'>") - line("'<") + 
1<CR>wincmd _<CR>`<zt

Anyway, I'd like your patch to be included.  It's useful.


PS: I also define an operator to do the same feature.  It's also useful for 
skilled users.
http://github.com/kana/config/blob/a6ccfa498ab6a88edb7f05acb008f4e4c8cfbaad/vim/dot.vimrc#L1700

-- 
To Vim, or not to Vim.
http://whileimautomaton.net/

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui