• ## Relative line numbering and current line

(14)
• NextPrevious
• I ve been distressed by the direction the discussion on the addition of the absolute line number to the relative line number functionality has gone. More
Message 1 of 14 , Jun 1, 2013
View Source
• 0 Attachment
I've been distressed by the direction the discussion on the addition
of the absolute line number to the relative line number functionality
has gone. More specifically, I don't see enough champions of relative
numbering fighting to keep it useful and economical and I'm afraid the
discussion with die before fixing the current state of things.
Perhaps the problem is that relative number users are too small a
minority to fight for themselves. The addition of the current
absolute line number to relative line numbering is a serious usability
regression for relative numbering and I would hate for it to make it
into 7.4 as it is.

From what I can tell, the hasty discussion that added the absolute
line number to the current relative line columns was motivated by the
fact that leaving a zero there wastes two characters of screen space
without any benefit besides looking nice and drawing the eye. Further
argument is that some people don't have the line number in their
statusline and may want to know what the current line number is with
some frequency.

1. Taking line numbers out of the status line and ruler line is a
choice the user can make, and one that I have to think a small number
of people choose. They aren't forced not to know where they are in
the file and can easily put that information in the status or ruler
without any loss of functionality.

2. The current line number is not all that important a piece of
information for a relative line number user. I jump around, copy
blocks, and do many other things with relative line numbering
constantly and I have never typed the number of my current line.
That's what the dot is for. Knowing the line number of nearby lines
could be useful, but that's one advantage of absolute line numbers
that relative line number users choose to sacrifice.

3. Having that fat number in the numbering column increases its width.
Instead of wasting two characters of space with a zero, we now waste
one or two (or more) whole columns all the time and there is no way a
relative line user can avoid this waste. Relative and absolute
numbering are both useful, but I chose relative line numbering largely
because it never occupies more than two columns of screen space while
absolute numbers suck up way more (and take a different amount of
space depending on where I am in the file).

4. I can live with poor aesthetics, especially if it provides really
useful functionality, but adding a big fat absolute number to the
column without any option to remove it is a major visual wart that
doesn't add significant information or functionality.

The discussion of how to solve this regression keeps getting shut down
because people point out that Bram (again hastily, I think) said we
don't need to provide options for everything, which many have
interpreted has him being unwilling to fix this problem. But I think
it is against the spirit of vim that we should remove useful
functionality (non-wasteful relative line number functionality) that
people depend on without at least giving them some backwards
compatibility. I have a hard time imagining who would choose to have
the absolute line number in that column after using it for a while.
Those who do must be a small group indeed. The discussion should be
current line number in order to benefit this small group, not whether
or not we need to preserve the existing functionality by adding an
option to undo the broken-ness that was just recently introduced.

Adding an absolute line number to relative line numbering sounds like
a cute idea. I was for it until I started using it. But in practice
it introduces the downsides of absolute numbering to relative
numbering without bringing the upsides. It's a pretty serious step
use the 0 again doesn't matter to me, as long as vim gets changed back
to full usefulness without me having to patch my local copy all the
time. The worst choice would be to leave this wasteful eyesore in
(and include it in 7.4) with no option for people to remove it besides
ceasing the use of relative line numbering altogether.

Let's not benefit the few at the expense of the many.
Grant

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... well said -- I agree completely, but the ones who need to get behind this in order to make it happen seem convinced the zero is useless and the absolute is
Message 2 of 14 , Jun 1, 2013
View Source
• 0 Attachment
On Sat, Jun 01, 2013 at 01:13:56PM -0400, Grant Farnsworth wrote:
> I've been distressed by the direction the discussion on the addition
> of the absolute line number to the relative line number functionality
> has gone. More specifically, I don't see enough champions of relative
> numbering fighting to keep it useful and economical and I'm afraid the
> discussion with die before fixing the current state of things.
> Perhaps the problem is that relative number users are too small a
> minority to fight for themselves. The addition of the current
> absolute line number to relative line numbering is a serious usability
> regression for relative numbering and I would hate for it to make it
> into 7.4 as it is.

> >From what I can tell, the hasty discussion that added the absolute
> line number to the current relative line columns was motivated by the
> fact that leaving a zero there wastes two characters of screen space
> without any benefit besides looking nice and drawing the eye. Further
> argument is that some people don't have the line number in their
> statusline and may want to know what the current line number is with
> some frequency.

> 1. Taking line numbers out of the status line and ruler line is a
> choice the user can make, and one that I have to think a small number
> of people choose. They aren't forced not to know where they are in
> the file and can easily put that information in the status or ruler
> without any loss of functionality.

> 2. The current line number is not all that important a piece of
> information for a relative line number user. I jump around, copy
> blocks, and do many other things with relative line numbering
> constantly and I have never typed the number of my current line.
> That's what the dot is for. Knowing the line number of nearby lines
> could be useful, but that's one advantage of absolute line numbers
> that relative line number users choose to sacrifice.

> 3. Having that fat number in the numbering column increases its width.
> Instead of wasting two characters of space with a zero, we now waste
> one or two (or more) whole columns all the time and there is no way a
> relative line user can avoid this waste. Relative and absolute
> numbering are both useful, but I chose relative line numbering largely
> because it never occupies more than two columns of screen space while
> absolute numbers suck up way more (and take a different amount of
> space depending on where I am in the file).

> 4. I can live with poor aesthetics, especially if it provides really
> useful functionality, but adding a big fat absolute number to the
> column without any option to remove it is a major visual wart that
> doesn't add significant information or functionality.

> The discussion of how to solve this regression keeps getting shut down
> because people point out that Bram (again hastily, I think) said we
> don't need to provide options for everything, which many have
> interpreted has him being unwilling to fix this problem. But I think
> it is against the spirit of vim that we should remove useful
> functionality (non-wasteful relative line number functionality) that
> people depend on without at least giving them some backwards
> compatibility. I have a hard time imagining who would choose to have
> the absolute line number in that column after using it for a while.
> Those who do must be a small group indeed. The discussion should be
> current line number in order to benefit this small group, not whether
> or not we need to preserve the existing functionality by adding an
> option to undo the broken-ness that was just recently introduced.

> Adding an absolute line number to relative line numbering sounds like
> a cute idea. I was for it until I started using it. But in practice
> it introduces the downsides of absolute numbering to relative
> numbering without bringing the upsides. It's a pretty serious step
> backwards. Whether it gets reverted or an additional option added to
> use the 0 again doesn't matter to me, as long as vim gets changed back
> to full usefulness without me having to patch my local copy all the
> time. The worst choice would be to leave this wasteful eyesore in
> (and include it in 7.4) with no option for people to remove it besides
> ceasing the use of relative line numbering altogether.

> Let's not benefit the few at the expense of the many.
> Grant

well said -- I agree completely, but the ones who need to get behind
this in order to make it happen seem convinced the zero is useless and
the absolute is cool. They've quoted Bram as saying he doesn't want
another option to control this, and Bram did not contradict that
statement (too busy maybe?).

my opinion is we don't need to create an option for it, we simply need
to revert to the zero and leave it !#@\$\$@#\$#W\$! alone

I've modified my copy of screen.c with the attitude "you can't fight
city hall" -- the bad news here is even with the zero back the width
of that field stays huge on a big file, even though it dosn't need to
-- I probably need to dig some more and find where it gets the width
-- dang I hate this

--
_|_ _ __|_|_ ._ o|
|_(_)(_)|_| ||_)||<
|

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• I would like the option to have the current line in the relative number column show the relative position in the file as a percent 00-99 without the %
Message 3 of 14 , Jun 1, 2013
View Source
• 0 Attachment
I would like the option to have the current line in the relative
number column show the relative position in the file as a percent
00-99 without the '%' character.

I could 'set numberwidth=2', it would consume the smallest space and
be consistent with the concept of relative.

Bill

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• --OR-- 3 characters as with :help ruler Top first line is visible Bot last line is visible All first and last line are visible 45% relative position in
Message 4 of 14 , Jun 1, 2013
View Source
• 0 Attachment
--OR--
3 characters as with :help 'ruler'

Top first line is visible
Bot last line is visible
All first and last line are visible
45% relative position in the file

Bill

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... It sounds like your modifications are the removal of the if blocks around lines 2239 and 3510. To fix the width we need to edit the number_width()
Message 5 of 14 , Jun 1, 2013
View Source
• 0 Attachment
> I've modified my copy of screen.c with the attitude "you can't fight
> city hall" -- the bad news here is even with the zero back the width
> of that field stays huge on a big file, even though it dosn't need to
> -- I probably need to dig some more and find where it gets the width
> -- dang I hate this

It sounds like your modifications are the removal of the if blocks
around lines 2239 and 3510. To fix the width we need to edit the
number_width() function and replace

lnum = wp->w_buffer->b_ml.ml_line_count;

with

if (wp->w_p_rnu && !wp->w_p_nu)
lnum = wp->w_height;
else
lnum = wp->w_buffer->b_ml.ml_line_count;

I believe that will revert vim to the previous, cleaner behavior.

I worry that asking for other things besides zero (as Bee is) will get
the whole idea tossed out. On the other hand the absolute number
thing seems to have at least a couple of fans on the dev list, so
having a bunch of different possibilities for what gets put where the
zero belongs might be more likely than getting it reverted.

It's hard to see relative number users not objecting to the current
behavior. When I opened screen.c to find this stuff, I counted the
columns being used. It was 6. That is a lot of wasted screen in an
80 column terminal.

This is my first discussion on vim_use. Perhaps I should have brought
it up on the vim_dev list instead? I'm not sure it will get noticed
here.

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... exactly ... cool -- thx ... Bram is so busy right now I m afraid we re on our own. ... my bad -- I sort of hijacked another thread here where [I think it
Message 6 of 14 , Jun 1, 2013
View Source
• 0 Attachment
On Sat, Jun 01, 2013 at 10:10:32PM -0400, Grant Farnsworth wrote:
> > I've modified my copy of screen.c with the attitude "you can't fight
> > city hall" -- the bad news here is even with the zero back the width
> > of that field stays huge on a big file, even though it dosn't need to
> > -- I probably need to dig some more and find where it gets the width
> > -- dang I hate this

> It sounds like your modifications are the removal of the if blocks
> around lines 2239 and 3510.

exactly

> To fix the width we need to edit the number_width() function and
> replace

> lnum = wp->w_buffer->b_ml.ml_line_count;

> with

> if (wp->w_p_rnu && !wp->w_p_nu)
> lnum = wp->w_height;
> else
> lnum = wp->w_buffer->b_ml.ml_line_count;

> I believe that will revert vim to the previous, cleaner behavior.

cool -- thx

> I worry that asking for other things besides zero (as Bee is) will get
> the whole idea tossed out.

Bram is so busy right now I'm afraid we're on our own.

> On the other hand the absolute number thing seems to have at least a
> couple of fans on the dev list, so having a bunch of different
> possibilities for what gets put where the zero belongs might be more
> likely than getting it reverted.

> It's hard to see relative number users not objecting to the current
> behavior. When I opened screen.c to find this stuff, I counted the
> columns being used. It was 6. That is a lot of wasted screen in an
> 80 column terminal.

> This is my first discussion on vim_use. Perhaps I should have brought
> it up on the vim_dev list instead? I'm not sure it will get noticed
> here.

my bad -- I sort of hijacked another thread here where [I think it was
Charles] mentioned the weirdness of the absolute number in the
relative column and I jumped on that. You're quite right, this
issue that it'll get noticed anywhere.

--
_|_ _ __|_|_ ._ o|
|_(_)(_)|_| ||_)||<
|

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... I use relative numbering all the time. Before, I occasionally had to switch back and forth between that and absolute. Now, I almost never need to. I LIKE
Message 7 of 14 , Jun 1, 2013
View Source
• 0 Attachment
On Saturday, June 1, 2013 12:13:56 PM UTC-5, Grant wrote:
> I've been distressed by the direction the discussion on the addition
>
> of the absolute line number to the relative line number functionality
>
> has gone. More specifically, I don't see enough champions of relative
>
> numbering fighting to keep it useful and economical and I'm afraid the
>
> discussion with die before fixing the current state of things.
>
> Perhaps the problem is that relative number users are too small a
>
> minority to fight for themselves. The addition of the current
>
> absolute line number to relative line numbering is a serious usability
>
> regression for relative numbering and I would hate for it to make it
>
> into 7.4 as it is.
>

I use relative numbering all the time. Before, I occasionally had to switch back and forth between that and absolute. Now, I almost never need to. I LIKE the absolute number. And I rarely notice either numbering at all, except for when I need it. I think "serious usability regression" is a huge overstatement.

But, I personally support an option to control this. I like even better the idea of 'relativenumber' and 'number' combining together instead of being mutually exclusive. There have been a couple patches submitted for both of these methods.

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... I don t -- sorry Ben, but when I want relative numbers, I find the absolute at zero a distraction ... but Bram has been quoted as not wanting more options
Message 8 of 14 , Jun 1, 2013
View Source
• 0 Attachment
On Sat, Jun 01, 2013 at 10:27:23PM -0700, Ben Fritz wrote:
> On Saturday, June 1, 2013 12:13:56 PM UTC-5, Grant wrote:
> > I've been distressed by the direction the discussion on the addition
> > of the absolute line number to the relative line number functionality
> > has gone. More specifically, I don't see enough champions of relative
> > numbering fighting to keep it useful and economical and I'm afraid the
> > discussion with die before fixing the current state of things.
> > Perhaps the problem is that relative number users are too small a
> > minority to fight for themselves. The addition of the current
> > absolute line number to relative line numbering is a serious usability
> > regression for relative numbering and I would hate for it to make it
> > into 7.4 as it is.

> I use relative numbering all the time. Before, I occasionally had to
> switch back and forth between that and absolute. Now, I almost never
> need to. I LIKE the absolute number. And I rarely notice either
> numbering at all, except for when I need it. I think "serious
> usability regression" is a huge overstatement.

I don't -- sorry Ben, but when I want relative numbers, I find the
absolute at zero a distraction

> But, I personally support an option to control this. I like even
> better the idea of 'relativenumber' and 'number' combining together
> instead of being mutually exclusive. There have been a couple
> patches submitted for both of these methods.

but Bram has been quoted as not wanting more options in this area --
it's a conundrum

I think gvfarns will be moving this topic to vim_dev -- perhaps we can
continue there...

--
_|_ _ __|_|_ ._ o|
|_(_)(_)|_| ||_)||<
|

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... Agreed. Backwards compatibility seems to be one of the guiding principles in Vim development. But backwards compatibility is not only a strictly technical
Message 9 of 14 , Jun 2, 2013
View Source
• 0 Attachment
On Saturday, June 1, 2013 7:13:56 PM UTC+2, Grant wrote:
> ... But I think
> it is against the spirit of vim that we should remove useful
> functionality (non-wasteful relative line number functionality) that
> people depend on without at least giving them some backwards
> compatibility.

Agreed.

Backwards compatibility seems to be one of the guiding principles in Vim
development. But backwards compatibility is not only a strictly
technical concept, it should include remaining backwards compatible with
the reasonable expectations and practices of the users. In that sense,
the absolute current line number is a decidedly backwards incompatible
change.

Anyway, people have made up their minds. Some think it's useful, some
think it's distracting. For some people it adds value, for some people
it subtracts value. Let's please make it customizable.

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... Wait, the big advantage of that little scheme is that no new options are required. number and relativenumber work together to satisfy both the
Message 10 of 14 , Jun 2, 2013
View Source
• 0 Attachment
On Sunday, June 2, 2013 8:13:05 AM UTC+2, toothpik wrote:
> On Sat, Jun 01, 2013 at 10:27:23PM -0700, Ben Fritz wrote:
> > But, I personally support an option to control this. I like even
> > better the idea of 'relativenumber' and 'number' combining together
> > instead of being mutually exclusive. There have been a couple
> > patches submitted for both of these methods.
>
> but Bram has been quoted as not wanting more options in this area --
> it's a conundrum

Wait, the big advantage of that little scheme is that no new options are
required. 'number' and 'relativenumber' work together to satisfy both
the absolutists and the relativists (of either kind) alike.

The question is whether it is confusing. And I think it is a very valid
question.

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... I think all it takes is a help note. In :help number replace the bit about resetting relativenumber with something like: If relativenumber is also
Message 11 of 14 , Jun 2, 2013
View Source
• 0 Attachment
On Sunday, June 2, 2013 3:43:06 AM UTC-5, glts wrote:
> On Sunday, June 2, 2013 8:13:05 AM UTC+2, toothpik wrote:
> > On Sat, Jun 01, 2013 at 10:27:23PM -0700, Ben Fritz wrote:
> > > But, I personally support an option to control this. I like even
> > > better the idea of 'relativenumber' and 'number' combining together
> > > instead of being mutually exclusive. There have been a couple
> > > patches submitted for both of these methods.
> >
> > but Bram has been quoted as not wanting more options in this area --
> > it's a conundrum
>
> Wait, the big advantage of that little scheme is that no new options are
> required. 'number' and 'relativenumber' work together to satisfy both
> the absolutists and the relativists (of either kind) alike.
>
>
> The question is whether it is confusing. And I think it is a very valid
> question.

I think all it takes is a help note. In :help 'number' replace the bit about resetting 'relativenumber' with something like:

"If 'relativenumber' is also set, puts the line number only on the line with the cursor"

And at :help 'relativenumber' replace the bit about resetting 'number' with something like:

"If 'number' is also set, the line with the cursor contains the line number, otherwise zero."

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... +1 Ben! I didn t understand this approach til I saw this email! I like it too. -- _|_ _ __|_|_ ._ o| ... -- -- You received this message from the
Message 12 of 14 , Jun 2, 2013
View Source
• 0 Attachment
On Sun, Jun 02, 2013 at 12:50:10PM -0700, Ben Fritz wrote:
> On Sunday, June 2, 2013 3:43:06 AM UTC-5, glts wrote:
> > On Sunday, June 2, 2013 8:13:05 AM UTC+2, toothpik wrote:
> > > On Sat, Jun 01, 2013 at 10:27:23PM -0700, Ben Fritz wrote:
> > > > But, I personally support an option to control this. I like even
> > > > better the idea of 'relativenumber' and 'number' combining together
> > > > instead of being mutually exclusive. There have been a couple
> > > > patches submitted for both of these methods.
> > >
> > > but Bram has been quoted as not wanting more options in this area --
> > > it's a conundrum
> >
> > Wait, the big advantage of that little scheme is that no new options are
> > required. 'number' and 'relativenumber' work together to satisfy both
> > the absolutists and the relativists (of either kind) alike.
> >
> >
> > The question is whether it is confusing. And I think it is a very valid
> > question.

> I think all it takes is a help note. In :help 'number' replace the bit about resetting 'relativenumber' with something like:

> "If 'relativenumber' is also set, puts the line number only on the line with the cursor"

> And at :help 'relativenumber' replace the bit about resetting 'number' with something like:

> "If 'number' is also set, the line with the cursor contains the line number, otherwise zero."

+1 Ben! I didn't understand this approach til I saw this email! I
like it too.

--
_|_ _ __|_|_ ._ o|
|_(_)(_)|_| ||_)||<
|

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• ... I like this, too. Even though I don t use and don t even like relativenumber at the moment, I may change my mind. If I do, I d like to be able to try
Message 13 of 14 , Jun 2, 2013
View Source
• 0 Attachment
On 2013-06-02, tooth pik wrote:
> On Sun, Jun 02, 2013 at 12:50:10PM -0700, Ben Fritz wrote:
> > On Sunday, June 2, 2013 3:43:06 AM UTC-5, glts wrote:

> > > Wait, the big advantage of that little scheme is that no new options are
> > > required. 'number' and 'relativenumber' work together to satisfy both
> > > the absolutists and the relativists (of either kind) alike.
> > >
> > >
> > > The question is whether it is confusing. And I think it is a very valid
> > > question.
>
> > I think all it takes is a help note. In :help 'number' replace
> > the bit about resetting 'relativenumber' with something like:
>
> > "If 'relativenumber' is also set, puts the line number only on
> > the line with the cursor"
>
> > And at :help 'relativenumber' replace the bit about resetting
> > 'number' with something like:
>
> > "If 'number' is also set, the line with the cursor contains the
> > line number, otherwise zero."
>
> +1 Ben! I didn't understand this approach til I saw this email! I
> like it too.

I like this, too. Even though I don't use and don't even like
'relativenumber' at the moment, I may change my mind. If I do, I'd
like to be able to try both formats and choose the one I prefer.
This seems like a clean, straightforward solution.

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
• On Sun, Jun 2, 2013 at 2:43 PM, tooth pik wrote: ... I echo this sentiment: I really wasn t understanding the issue at all until this
Message 14 of 14 , Jun 2, 2013
View Source
• 0 Attachment
On Sun, Jun 2, 2013 at 2:43 PM, tooth pik <toothpik6@...> wrote:

Ben Fritz wrote:
>> I think all it takes is a help note. In :help 'number' replace the bit about resetting 'relativenumber' with something like:
>>
>> "If 'relativenumber' is also set, puts the line number only on the line with the cursor"
>>
>> And at :help 'relativenumber' replace the bit about resetting 'number' with something like:
>>
>> "If 'number' is also set, the line with the cursor contains the line number, otherwise zero."
>>
> +1 Ben! I didn't understand this approach til I saw this email! I
> like it too.

I echo this sentiment: I really wasn't understanding the issue at all
until this message. But now I not only understand, but it seems like a
preferable setup to me.

c
--
Chris Lott <chris@...>

--
--
You received this message from the "vim_use" maillist.