Wednesday, April 7, 2010

Re: switching to window, by buffer nr

On Wednesday 07 April 2010 15:16:46 Christian Brabandt wrote:

> Hi viki!
>
> On Mi, 07 Apr 2010, viki wrote:
> > Screen is split into several windows. One of windows belongs
> > to buffer #1. Which command sequence takes me to window
> > that belongs to buffer #1, without changing window layout
> > and without changing filenames of any window ?
>
> exe "bufwinnr(1)" wincmd w
>
> instead of 1 insert your buffer number.
>
> See
>
> :h bufwinnr()
> :h bufname()
> :h exe
> :h wincmd

that looks backwards to me -- i think it should be

execute bufwinnr(1) "wincmd w"

sc

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

To unsubscribe, reply using "remove me" as the subject.

No comments: