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?
+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.
It’s not currently possible
Bump to see if this is possible now or in the foreseeable future.
+1 This is very useful feature.
[quote=“tmanderson”]This might do it for you:
Can someone give me few good examples, what should i use this for?
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.
I’ll just copy my post from https://sublimetext.userecho.com/topics/3943-relative-line-numbers/
Looks like I’m digging up a very old post, but VintageLines is way too limited to be a final solution… Most of the issues are related to the fact that it uses .png files instead of native line numbers. For instance, it doesn’t go above 999 (I know, no file should exceed that… but welcome to reality!), also, it doesn’t integrate well with GitGutter and similar plugins, etc. So it would be great if either Sublime would support that feature natively, OR, if VintageLines could have access directly to the native lines numbers instead of having to use a hack.
Other link I saw after reading this post: Relative line numbers, because plugins can't properly do it