Is there any way to align current line number to right? It looks strange by default, current line is aligning to left. Why there is not option to change it?
I tried to find a solution with :help cul
This thing looks ugly
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
This behavior is hardcoded. You can only modify it and recompile
@gapeevanton Sounds bad. Maybe there is some instructions for solving this problem? Why is the alignment change not provided?
No there is no other possibility, except if you want to abuse the sign feature for that. Note, we are trying avoid adding options for such small things (this might be debatable here). However, there is already #680 and #1368 in which a 'numberformat' option has been whished. However, a patch which includes a test would be appreciated :)
@chrisbra Thank you for the answer. I hope 'numberformat' option will be released
There is one option:
:se nonu rnu
It will right align the current line,
BUT
the current line number is then '0'
which, to me, makes more sense with 'relative' numbering
@vim-ml Maybe. But I want to see exactly the number of the current line
—
You are receiving this because you were mentioned.
Any progress?
—
You are receiving this because you were mentioned.
nobody has worked on that feature as far as i know. If you really want this feature, you could try the other issues perhaps there is a PR that implements your behaviour. We would need tests for the feature and some feedback how it works would be appreciated as well.
—
You are receiving this because you were mentioned.
This behavior is hardcoded. You can only modify it and recompile
Actually, I was about to report a bug, but discovered this request for an option.
Could alignment be hardcoded to right? I really don't see a reason why would it be hardcoded into an such odd position, which feels like it takes an additional space for no reason (although aligns correctly at a thousand of lines). It looks as if hybrid numbers were hacked up on an UI that isn't really suited for that.
—
You are receiving this because you were mentioned.
I agree with Nazri, especially since in the default highlighting the coulours for the current and relative line numbers are not very different: both in bright yellow in a (dark) cterm, or relative numbers in brown and current line in bold brown in the (light) GUI.
The current behaviour seems intentional, see the examples at :help number_relativenumber
.
Best regards,
Tony.
—
You are receiving this because you were mentioned.
Okay, I respect other's workflow. The problem is that it doesn't work well even for your usecase. The behavior would make sense if it was always aligned, but it's not: if the file have between 100 and 999 lines, then anywhere at 100..999 it's aligned to right. Same for 1000..9999. This only doesn't hold for 1..9 and 10..99, dunno why — but then, files typically have more than 100 lines.
—
You are receiving this because you were mentioned.
The behavior would make sense if it was always aligned, but it's not
That depends on numberwidth
. Set it to a higher value and you'll see a consistent behaviour.
—
You are receiving this because you were mentioned.
Also, if I'm at a "late" line in the file, it stands out by the mere fact that its high number is in the middle of one-digit numbers, e.g. 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 6543, 1, 2, 3, … OTOH, in the case of 4, 3, 2, 1, 5, 1, 2, 3, … the 5 would be much less obvious if it were aligned with the others (and, as with the default colorscheme, in the same or almost the same colour).
Best regards,
Tony.
—
You are receiving this because you were mentioned.
I'm wondering, can we come to a compromise that doesn't look as if the feature was hacked up on a UI that requiring rewriting in the first place. How about using bold, italic, or a color to highlight the current line?
—
You are receiving this because you were mentioned.
Another point for using a different way to highlight the current number: have anybody tried hybrid line-numbers in Arabic mode? If you open e.g. vim -A /etc/profile
you'll find that the current line-number melds with the current line, i.e. there's no space between them.
I bet you can add right-to-left-language users to the list of unhappy ones.
—
You are receiving this because you were mentioned.
@Hi-Angel The CursorLineNr
highlight group can be used to highlight the number however you want:
:highlight CursorLineNr cterm=bold,italic gui=bold,italic
—
You are receiving this because you were mentioned.
@Hi-Angel The CursorLineNr highlight group can be used to highlight the number however you want:
:highlight CursorLineNr cterm=bold,italic gui=bold,italic
Great! Given that part is solved, are we changing the current line to align to the left, or is there anything else is blocking?
—
You are receiving this because you were mentioned.
@chrisbra you linked a PR. An issue can not be a duplicate of PR (especially of one referring back to the same issue). An issue can be solved by PR, but for that PR needs to be accepted, and the one you linked haven't been.
—
You are receiving this because you were mentioned.
Yes I did and I personally don't like to have PRs and issues for the same thing laying around, because it happens often enough that the corresponding PR get's closed once Bram merges it and the issue keeps laying around open and no one notices it. I personally like to have the issues in a manageable state, which would not be the case and as you can see from the issue number, we have already several hundred open issues here, which is barely manageable by the maintainers here. It does not help anybody to have this issue list here becoming a bare garbage dump site. So my decision stands. Thanks for understanding.
—
You are receiving this because you were mentioned.
Is there any chance of reviving this issue since the associated PR was abandoned?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Also, I know this is years later and probably irrelevant by now, but did you know that putting the text "Fixes #1875" in the description of PR will automatically close that issue when the PR is merged? Makes keeping issues and PRs in sync much more manageable.
Reopened #1875.
Bram doesn't use the merge button, so it doesn't work.
It also works in commit messages, but fair enough. I don't want to mess with someone's work flow.
Thanks for reopening!
Well, I think this function should be necessary
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.