On 09/10/10 00:07, [email protected] wrote:
Hi,

I have splitted windows into a number of small windows. I found that
the window numbers are changing if I splitted window again. For
example, if I have 4 windows and they are number in 1,2,3,4. If I
split the window 1 with new command, then the old window 2,3,4 will
have the number 3,4,5. Are there any way to prevent the new window
number got inserted into the existing one? Also, can I display the
window numbers on the status line of each window?

Thanks

Frank


The window numbers correspond to a top-down, left-to-right numbering. If you insert a new window anywhere except after the last window, all windows "after" it will see their number increase. If you close any window other than the last one, all windows after it will see their number decrease.

- To open a new window without changing existing windows' numbers: see :help :botright

- In general: don't rely on window numbers in the long term

- To display the window number on the status line: use a custom status line (see http://vim.wikia.com/wiki/Show_fileencoding_and_bomb_in_the_status_line for an example) and include in it the string

    %{winnr()}

where you want the window number to appear. Add any spaces, punctuation, etc. to your liking outside the %{...} and remember that in the operand of a :set statement, any spaces, double quotes, vertical bars or backslashes must be backslash-escaped.

See
        :help 'statusline'
        :help winnr()


Best regards,
Tony.
--
Down with categorical imperative!

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