Menu

#427 nextword / prevword are not symmetrical

Unknown
open
nobody
None
v4.6
5
2026-03-28
2026-03-28
No

I have these in my .joerc to assign Ctrl+Left/Right to the prevword/nextword actions:

nextword                                ^[ [ 1 ; 5 C
prevword                                ^[ [ 1 ; 5 D

I open a file consisting of this one line only:

somevalue = 12345

With Ctrl+Right, it takes 4 steps to move the cursor to the end of the line. With Ctrl+Left, it takes 3 steps to go back.

On the way there, it stops 2 times before the = sign, on the way back it only stops once.

I'd expect the two actions to be symmetrical in some sense.

(Note that this not necessarily means the same stopping points. If you simply have

somevalue 12345

then on the way there it stops after somevalue, on the space's left, while on the way back it stops after jumping through 12345, on the space's right. This is the same as the behavior of many other software out there, and is absolutely fine. What is missing is some consistency whether = is a word-char in this regard or not.)

Reproducible with 4.6 as well as latest git main 1febe5940d5.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB