Re: how anchor text when resize window?
- On 2/14/08, Greg Klein <gklein@...> wrote:
>You might try messing with the VimResized autocmd event. I don't know
> > > When I resize my vertically split windows the displayed text within each
> > > window moves. I don't want that. I would like the displayed text within
> > > each window to remain anchored to the top of its window as I resize. How
> > > do that?
> > >
> > > (In particular, when I grow the lower window upward, thus shrinking the
> > > upper window, the displayed text at the top of the upper window slides
> > > up out of view.)
> > so you mean horizontally split windows, don't you?
> > The effect you see is because Vim tries to keep the current line (i.e.,
> > the line with the cursor) of the upper window visible. If you don't want
> > to move the text up, you can first put the cursor in the topmost line
> > before enlarging the lower window.
> > Regards,
> > Jürgen
> Right, I meant horizontally split (top over bottom). Thanks for the tip, it
> works as you described. Even better, I'd rather not have to bother with
> moving the cursor to the top line (in both windows) before I resize. I
> constantly resize so the extra step is inconvenient. Is there a setting that
> will anchor the text even if I don't move the cursor to the top? Or,
> slightly less desirable, automatically move my cursor to the top any time I
> resize (which I do by dragging the status line, not by :resize command).
if this will work (I couldn't get it to) but something like this might
autocmd VimResized * normal H
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php