Sunday, January 13, 2019

Re: Jump to previous window when closing a window

On 2019-01-13, Lifepillar <lifepillar@lifepillar.me> wrote:
> If you run `vim --clean` and type <c-w>v<c-w>v<c-w>L<c-w>c, the cursor
> will jump to window 2 instead of window 1, where the cursor was before
> window 3 was closed. Is there a way to have the cursor go to the
> previous window (as in <c-w>p) when another window is closed?

The following sequence may better illustrate what I am asking for. In
a new session, type:

IC<esc>
:vnew
IB<esc>
:vnew
IA<esc>

Now, you should have three vertical splits A, B and C, with the cursor
in window A. If you type 2<c-w>l to move to window C, then close window
C with :close!, window B will become the active window, although the
previously active window was window A.

Is there an option to make the previously active window the current one
when a window is closed?

Life.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment