Thanks for the help. It does solve part of my problem since one window
is always open one fixed files, so I can find the window number by
command:
let l:tmp=bufwinnr("file_name").

for other window that keeps open different window, i need to try this
method to see whether it works or not.

thanks again

Frank

On Jun 9, 12:06 pm, Charles Campbell <[email protected]>
wrote:
> [email protected] wrote:
> > Hi,
> > In my script, I split the window into 4 windows. In my script, I jump
> > to each window when I need by using the command exe g:window_number .
> > " wincmd w". However, when I split the window during the editing, the
> > g:window_number will be changed. So the command does not work since it
> > switches to the different window.
>
> > Does anyone know how to solve this problem? Can I assign each window a
> > permanent number or lable so the script can switch to them later?
>
> Windows are numbered by vim; additional window splits will, as you've
> noticed, change windows' numbers.  So, no, you can't assign permanent
> numbers to windows.
>
> However, buffers are numbered by vim when loaded, and don't change
> during the session.  Perhaps you could use bufwinnr(), although that
> admittedly won't differentiate between different windows accessing the
> same buffer.
>
> Regards,
> Chip Campbell

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

Reply via email to