Home Download Buy Blog Forum Support

Relative line numbers for Vintage mode

Relative line numbers for Vintage mode

Postby Swimming_Bird on Wed Sep 21, 2011 8:55 pm

Lots of vim commands make you go up/down x number of lines so a relative line number is very useful. Is there any way to change the gutter line numbers to be relative to the current line?
Swimming_Bird
 
Posts: 15
Joined: Tue Sep 06, 2011 3:55 pm

Re: Relative line numbers for Vintage mode

Postby tjstankus on Mon Jan 16, 2012 5:28 pm

+1. I'd love to see a relative line numbers option or an API hook. I've looked through the API reference trying to find a way to draw line numbers, which could be used to build a relative line number plugin, but no luck. Am I missing something? Is this even possible? Thanks.
tjstankus
 
Posts: 4
Joined: Sat Jan 29, 2011 4:35 pm

Re: Relative line numbers for Vintage mode

Postby jps on Mon Jan 16, 2012 11:35 pm

It's not currently possible
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Relative line numbers for Vintage mode

Postby Swimming_Bird on Wed Jul 25, 2012 10:12 pm

Bump to see if this is possible now or in the foreseeable future.
Swimming_Bird
 
Posts: 15
Joined: Tue Sep 06, 2011 3:55 pm

Re: Relative line numbers for Vintage mode

Postby joon on Wed Aug 15, 2012 3:39 pm

+1 This is very useful feature.
joon
 
Posts: 4
Joined: Tue Aug 14, 2012 7:02 pm

Re: Relative line numbers for Vintage mode

Postby tmanderson on Wed Sep 19, 2012 4:03 pm

tmanderson
 
Posts: 4
Joined: Wed Sep 19, 2012 4:02 pm

Re: Relative line numbers for Vintage mode

Postby S0und on Fri Sep 21, 2012 6:01 pm

tmanderson wrote:This might do it for you:

https://github.com/tmanderson/VintageLines


Can someone give me few good examples, what should i use this for?

EDIT:

Code: Select all
15j


Image
S0und
 
Posts: 70
Joined: Wed Oct 28, 2009 4:12 pm

Re: Relative line numbers for Vintage mode

Postby weslly on Fri Sep 21, 2012 6:31 pm

S0und wrote:Can someone give me few good examples, what should i use this for?


http://jeffkreeftmeijer.com/2012/relative-line-numbers-in-vim-for-super-fast-movement/ wrote:Commands like j (down) and k (up) can be prefixed with numbers, so 5j will jump down five lines. While that’s pretty cool, chances are you won’t actually do that, since counting lines usually takes longer than pressing j until you’re on the right line, especially when you need to jump more than five lines. The same goes for deleting lines, as you probably switch to visual mode and press j a couple of times instead of counting lines and pressing d7d.


With relative line numbers you don't need to calculate in your head how many lines you need to jump. You just look the number of the line you want to go and use it to prefix your movement command.
weslly
 
Posts: 202
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil


Return to Plugin Development

Who is online

Users browsing this forum: Alexa [Bot] and 10 guests