number relativenumber reset bug?
I use several machines, Linux, Mac, Windows and have a vimrc that
works very for all. The versions of vim range from 6.2 to 7.3.475,
small, normal, and huge.
The only 'problem' is with number and relativenumber.
The default for the small vim is set early in vimrc:
set number
and for those that support relativenumber is set at the end within an
'if' which is ignored by the small version:
set relativenumber
The problem manifests itself in the vim that support relativenumber.
Opening the first file in vim, the numbers are relative.
BUT if I open another file from within vim it is opened as 'number'.
vim documentation has for relativenumber:
"When setting this option, 'number' is reset."
Am I misinterpreting 'reset'?
Why is the newly opened file set to 'number'?
As a 'fix' I tried:
set nonumber relativenumber
This works perfectly.
Why is it needed?
" -------1---------2---------3---------4---------5---------6----
*'number'* *'nu'* *'nonumber'* *'nonu'*
'number' 'nu' boolean (default off)
local to window
Print the line number in front of each line. When the 'n' option is
excluded from 'cpoptions' a wrapped line will not use the column of
line numbers (this is the default when 'compatible' isn't set).
The 'numberwidth' option can be used to set the room used for the
line
number.
When a long, wrapped line doesn't start with the first character,
'-'
characters are put before the number.
See |hl-LineNr| for the highlighting used for the number.
When setting this option, 'relativenumber' is reset.
*'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'*
'relativenumber' 'rnu' boolean (default off)
local to window
{not in Vi}
Show the line number relative to the line with the cursor in front
of
each line. Relative line numbers help you use the |count| you can
precede some vertical motion commands (e.g. j k + -) with, without
having to calculate it yourself. Especially useful in combination
with
other commands (e.g. y d c < > gq gw =).
When the 'n' option is excluded from 'cpoptions' a wrapped
line will not use the column of line numbers (this is the default
when
'compatible' isn't set).
The 'numberwidth' option can be used to set the room used for the
line
number.
When a long, wrapped line doesn't start with the first character,
'-'
characters are put before the number.
See |hl-LineNr| for the highlighting used for the number.
When setting this option, 'number' is reset.
" -------1---------2---------3---------4---------5---------6----
--
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