2

Per default I have the relative numbers and actual numbers active on my vim sessions. However I find myself switching quite often to the actual line numbers as I like to copy elements from a certain line below my current e.g: :34t.

My first idea was to have the full numbers left and the relative numbers right, but if nothing has changed in this regards in the last 4 years this post already gives a negative answer on this. How to show line numbers in vim on the right side of the buffer?

So my question would be: is there any way to have just both the actual and the relative line numbers displayed in two columns?

4 26
3 27
2 28
1 29
0 30 I
1 31
2 32
3 33
4 34
5
  • 1
    The closest option seems to be :set number relativenumber: vimhelp.org/options.txt.html#number_relativenumber There might be a plugin: stackoverflow.com/a/16624418/2072269 Commented Dec 2, 2019 at 7:19
  • Doesn't hybrid line number work for you ? set number relativenumber should show both relative numbers of other lines and actual number of current line Commented Dec 2, 2019 at 7:22
  • 1
    The hybrid line numbers is what I am currently use. But on a quick glance on the screen I can not tell what actual line number a line is on without navigating to it. Commented Dec 2, 2019 at 7:49
  • @muru Plugin looks like the solution. I'll give that a shot Commented Dec 2, 2019 at 7:53
  • You don't really need the actual line number, though. You can do, say :.+8t. to copy the 8th line from the current. Commented Dec 2, 2019 at 7:54

1 Answer 1

3

Thanks to muru's suggestion the RltvNmber Plugin is achieving what I initially was looking for however using the suggested :+8t. syntax might be the leaner solution.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.