manipulator-plugin icon indicating copy to clipboard operation
manipulator-plugin copied to clipboard

incNum doesn't work correctly

Open jabbalaci opened this issue 2 years ago • 0 comments

In vim, we have Ctrl-a to increase and Ctrl-x to decrease a number. There, you can press for instance Ctrl-a constantly and it'll increase the number rapidly.

I expected that the command incNum would work similarly. First of all, I made a shortcut that also includes moving the cursor back onto the number:

"Alt-a": "lua:manipulator.incNum,CursorLeft",

However, if I have "19" and the cursor in on "9", it becomes "110". It only increases 9, not the whole number.

If I have 16 and the cursor is on "1", it becomes 27. Weird.

If the number is in a sentence, like "I ate 3 icecreams." and you increment 3, the cursor jumps to the end of the line.

I think it'd be better to mimic vim's behavior here.

jabbalaci avatar Oct 29 '23 12:10 jabbalaci