Replies: 6 comments 1 reply
-
This behavior is intentional: increment/decrement act on the selection so you should select the number you want to increment/decrement before using C-a/C-x |
Beta Was this translation helpful? Give feedback.
-
@the-mikedavis |
Beta Was this translation helpful? Give feedback.
-
Actually I think this makes the C-a/C-x feature less useful than it could be, reopening. I've reworded the description a bit |
Beta Was this translation helpful? Give feedback.
-
If the number you want to increment/decrement is a separate word (i.e. "1234 km"), you can do this with a key bind: C-a = [ "move_prev_word_start", "collapse_selection", "move_next_word_end", "increment" ]
C-x = [ "move_prev_word_start", "collapse_selection", "move_next_word_end", "decrement" ] |
Beta Was this translation helpful? Give feedback.
-
@CptPotato Sure, I could, I opened this issue more so that the default behaviour of these keys in Helix is made "less surprising". FWIW |
Beta Was this translation helpful? Give feedback.
-
Now you have to exactly select the number you want to modify, which is often tedious when e.g. changing an ordered list.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
C-a and C-x work in an unexpected way (for ex-Vim users), when only one character is selected.
It's almost never the case that the user wants to only increment/decrement one digit in a number, instead of the whole number:
Reproduction Steps
209km
9
, press^a
(C-a
)2010km
(expected210km
)1
in2010
, press^x
2000km
(expected2009km
)2000km
, and press^a
2001km
)Helix log
~/.cache/helix/helix.log
Nothing relevant in helix.log
Platform
Linux
Terminal Emulator
any
Helix Version
23.03
Beta Was this translation helpful? Give feedback.
All reactions