[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