You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if the cursor is on "f" in "julia> asdf" and one presses x while in command mode the "f" is replaced with a space. but if rather the cursor is on say the "s" and x is pressed the "s" is deleted and "df" shifts left so that "adf" is left. another x then conveniently deletes the "d". it would be nice to be able to similarly delete multiple characters at the end of the line. as is it stands now, that requires two key strokes instead of one: x followed by h.
The text was updated successfully, but these errors were encountered:
Interestingly, debugging this issue reveals a broader pattern vim implements. I was somewhat confused because x is described as a synonym to dl, so I couldn't see how special behavior could be implemented for x only.
But what vim does after dl, and after all delete operations is it adjusts the cursor position if it's outside of a line to ensure the next operation is from within the same line. If the delete operation leaves the cursor at the end of the line, it should move it to the left in order to remain within the line.
This is true for dl and also other text objects, e.g. daw.
So the fix here is to ensure that a delete operation is followed by a "corrective" move of the cursor, if necessary.
if the cursor is on "f" in "julia> asdf" and one presses
x
while in command mode the "f" is replaced with a space. but if rather the cursor is on say the "s" andx
is pressed the "s" is deleted and "df" shifts left so that "adf" is left. anotherx
then conveniently deletes the "d". it would be nice to be able to similarly delete multiple characters at the end of the line. as is it stands now, that requires two key strokes instead of one:x
followed byh
.The text was updated successfully, but these errors were encountered: