Sublime Forum

Relative line numbers, because plugins can't properly do it

#1

This is one of my most missed features and a big reason for me to pick other editors over sublime. My workflow is heavily focused on relative jumps.
I know that there’s github.com/tmanderson/VintageLines, but that plugin is on one side a big hack that inserts (pre-generated) images into the gutter and on the other side will effectively overwrite the entire gutter, making other gutter plugins like SublimeLinter or GitGutter useless.

So my request, please give us relative line numbers in the style of vim. That shouldn’t be too hard to implement :smile:

A other idea would be a system that allows plugins to write in different columns inside the gutter, so they don’t mess with each other.

19 Likes

Relative line numbers for Vintage mode
API Suggestions
#2

I would like to see this feature as well!

0 Likes

#3

I would like to see this too!

0 Likes

#4

+1

I’d love to see this too.

0 Likes

#5

Together with this it would be useful to have a Goto relative line offset, eg:

Goto line (Ctrl+G) :+3 - jump 3 lines down
Goto line (Ctrl+G) :-3 - jump 3 lines up

:slightly_smiling:

3 Likes

#6

+1

Really missing this feature in ST now.

0 Likes

#7

Bumping this. Any chance we could get an API or direct implementation to make this possible?

1 Like

#8

another bump. Now with @wbond working on ST, any chance we might see this implemented anytime soon?

0 Likes

#9

I’m just getting into VIM keybindings and it seems like having relative numbering is almost essential. This would be so useful! BUMP

1 Like

#10

yeah would be a great addition !

0 Likes

#11

Plugins can do this now by adding a phantom at column 0 of every line…

1 Like

#12

@kingkeith Can you point to a specific plugin that does it? Or you’re just saying it’s possible now?

0 Likes

#13

I believe he’s just saying it’s possible.

1 Like

#14

Hi,
I just created this plugin, now.

Inspired by VintageLine, but this it use Phantoms instead Regions. It’s unestable, yet. Please, help me to improve it, test it and develope it.

Thanks.

6 Likes

#15

This is almost working for me! I can see the relative lines if I scroll to the left, but as soon as I move my cursor, it automatically scrolls to the right and hides them. How do I prevent this?

0 Likes

#16

Try with enabled word wrapping.

0 Likes

#18

unfortunately phantoms don’t play well with the indentation guides, making them appear in random places :frowning:

I doubt there is anything that can be done to fix this, however…

with relative line numbers:

without relative line numbers:

2 Likes

#19

I don’t think it’s possible to implement it using phantoms. At least not a usable solution. There are too many issues and limitations. francescarpi/RelativeLineNumbers is a good attempt.

0 Likes

#20

Is a true relative-numbers plugin still not possible?

0 Likes

#21

Relative line numbers in sublime text would be nice

0 Likes