Wednesday, May 29, 2013

Re: use of vim signs

On Wednesday, May 29, 2013 10:31:20 AM UTC-5, toothpik wrote:
>
>
> ok, looking at the code it's a simple change in two places in screen.c
>
> (lines 2339 and 3509) to get the current line number back to zero when
>
> in relativity mode
>
>

Maybe, but this was specifically added as a feature so I doubt it will get
reverted.

I certainly prefer the line number instead of zero.

>
> my personal opinion would be to have the default for rnu0 to be on, but
> we should vote on that, with Bram as the decider since most people won't
> care or vote
>

In the vim_dev thread Christian mentioned (
https://groups.google.com/group/vim_dev/msg/194c62c57ddf9ee9 ) Bram
already said explicitly that he didn't want another option for this.

>
> (when I first expressed enthusiasm for relative numbers they showed the
> zero, not some misaligned line number that's repeated in the ruler -- it
> looks suspiciously like something that was snuck in my someone just
> showing off (looky what I can do!))
>

It wasn't. It was a "the zero is useless; let's display some useful
information there instead" argument with lots of discussion.

Not everybody shows the line number in their status line or ruler, or
shows either of those things at all, and they may want to be able to see a
line number still. Or in my case, I may have so many open windows that the
line number in the status line is much harder to pick out than if I just
scan over to the left on my current line. Or maybe the statusline setting
is such that line numbers get truncated on narrow windows. Additionally,
when Vim doesn't have input focus (for referring to line numbers in an
email or something), you can't even ":set number" easily to see line
numbers in your window. My solution to this is a FocusLost autocmd but
that pre-dated the line number at the cursor line in relativenumber mode.
Perhaps I would have just used that (and mentally added or subtracted the
line number) were it available before I made my FocusGained/FocusLost
autocmds.

There are plenty of use cases where an absolute line number in the
relative column is very useful, and currently the only complaint is "it
makes my number column a few characters wider and I don't like that".

How about a different solution? We could modify the behavior of that
absolute number, to make it so that one absolute numbered line isn't
allowed to expand the line number column. If it won't fit, show zero or
truncate it with < like in the statusline or something. If a user wants to
show it anyway they can increase their 'numberwidth' option.

I was going to see what happens to the normal line number column when the
limit of width 10 is reached, but Vim has been chugging away for almost an
hour trying to load a 3GB file (I let a cmd.exe "for" loop run for a while
to create a huge file with nothing but DOS-style line endings); even with
no plugins, eventignore set to "all", undolevels set to -1, and using the
:view command to avoid a swap file. So I think I'll give up on waiting for
that.

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

---
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@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment