This is relativenumber
. It shows the line numbers, relative to your cursor:
1 one line before your cursor
0 your cursor is here
1 first line after
2 second line
3 third line
4 and so on
It's super useful for quickly editing a number of lines. But is it possible to have the same thing, except for characters in a line? Something like this:
8 3 0 2 10 16 22 25 X X X X X X X X X
This is a pretty long line. It can be annoying to edit. EspeciallyIfThere'sALotOfTextAtOnce
^
your cursor is here
You can see that each word or longer string of characters has a relative character count number on top of it (I stopped using numbers and started using X's eventually, but you get the point).
So let's say I want to edit the string It can be annoying
to It is annoying
. I could do 25k
to go to the word I want to edit, type 2cw
to change two words and replace them with the string "is".
Considerations:
- The numbers need to be spaced out because having them too close to each other would be confusing
- Using characters instead of numbers (e.g X and Y instead of 100 and 105) might be a good idea
Is there any existing solution out there for accomplishing this? I'd like to give it a try.
Edit: An even better idea might be to display word numbers instead of character numbers. Like this:
2 1 0 1 2 3 4 5 6 7 8 9
This is a pretty long line. It can be annoying to edit.
^
your cursor is here
If the number 5
is on top of the "can", then I can just type 5w
to go to the word "can".
fc
to get tocan
. Or2fl
to get toline
. And so on. Combined with;
and,
to go forward/backward by one occurrence and you can move about pretty adeptly.;
and,
, so maybe I should give it another shot (though I would still prefer being able to get to where I want to go with one command, and not have to pay attention to whether I've gone too far or not). I've been typing/can
, but I'm looking for something faster, where I don't have to worry about escaping regex/can
but I usef
,F
,t
,T
,;
,,
(along with the other basics likew
andb
) pretty adroitly after some practice...to the point that I don't feel the need for something like what you describe or EasyMotion.