On Thursday, May 30, 2013 1:31:11 AM UTC-5, Nazri wrote:
> On Wed, Feb 6, 2013 at 11:06 PM, Bram Moolenaar <[email protected]> wrote:
> 
> > No, I don't want to remove or deprecate existing options.  It's very
> 
> > annoying for people who get a new Vim version, especially if they didn't
> 
> > install it themselves.
> 
> >
> 
> > I'm not sure the whole 'linenumber' option thing is the right way to go.
> 
> > We do not need to offer every possible way a user wants to see line
> 
> > numbers.
> 
> 
> 
> The 'linenumber' patch adds too much code for controlling how the
> 
> current line number is shown when relative number is set.
> 
> 
> 
> Lane East's approach (earlier in this thread, rnucurrent.diff) is much
> 
> better and less intrusive but the proposed solution is flawed - it uses
> 
> a global variable for holding the option instead of window-local.
> 
> 
> 
> Attached is a patch based on Lane East's idea. I changed the option name
> 
> from "relativenumbercurrent" to the shorter "currentnumber":
> 
> 
> 
> Excerpt from ":help currentnumber":
> 
> --8<--
> 
>                                         'currentnumber' 'cnu'
> 
> 'currentnumber' 'cnu'   number (default 0)
> 
>                         local to window
> 
>                         {not in Vi}
> 
>         When 'relativenumber' is set, this option controls how the current 
> line
> 
>         number is shown:
> 
>         value   effect
> 
>          -1     Show current line number, left aligned
> 
>           0     Show 0 instead of current line number
> 
>           1     Show current line number, right aligned
> 
>         When 'relativenumber' is not set, this option has no effect.
> 
> -->8--
> 
> 
> 
> Several people have raised their unhappiness at how the new behavior of
> 
> 'relativenumber' using a lot of screen columns for showing the current
> 
> line number for large files.  The proposed 'currentnumber' option should
> 
> make everyone happy.
> 
> 


See also the thread on vim_use with an alternate approach:

https://groups.google.com/d/topic/vim_use/fjG8gaeqpRc/discussion

IIUC the patch by Christian in that thread uses 'number' plus 'relativenumber' 
together to mean the same as 'currentnumber' set to 1 (or maybe -1), and 
'relativenumber' by itself to mean 0.

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui