Monday, December 29, 2014

Re: How do I open a new window without losing focus in the current one?

On 2014-12-29 06:18, Jeff Baxter wrote:
> If I use
>
> :new [filename]
>
> the file is opened in a split window, but the focus is also shifted
> there, whereas I want it to stay in the current window.
>
> How can I do that?

I'm not sure it's possible to open an unfocused window. However, you
can use ^W-p or ":wincmd p"

:help CTRL-W_p
:h :wincmd

to return to the previous window you were in regardless of where the
new window was opened. Granted, that does alter what the previous
"previous window" was before you opened the new window, but I'm not
sure there's much one can do about that.

-tim




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