-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple selection increment #3910
Comments
To my knowledge this is actually the intended behavior, not a bug. Increment doesn't produce a range but increments each selected number separately. Though, I've been in a similar situation where I wanted to generate a range of numbers a few times. For reference, Sublime Text has plugins such as Text Pastry that enable this. |
Interesting. I thought it would be the same way as it is with Vim. |
One way to achieve the desired behaviour here would be to make sure the top selection is the primary one (using |
Yeah as far as I know this is expected behavior. This could definitely be a new command though. |
I'd love to work on implementing command like this, but I'll need some hand-holding, as I'm new to the codebase. |
@MGlolenstine This is a change you can make in the increment_impl function inside the src/commands.rs to make the increment function behave like vim's g+ : If we are going to implement this there is still the need to define which shortcut we can use. |
The PR opened should fix the issue, but it changes the way the increment works. I'm thinking about making this another command, but I don't know what that would look like. |
Resolved by #4418. This is the behavior when the register is |
Should we specify in the docs that |
Summary
and I'd like to increment them as such.
if I select all of the 15s but the first one and press C-a, it increments them all to 16 and not like I want.
Reproduction Steps
15
, presse
andC
few times to select all15
s.C-a
, which increments numbers.16
s and not being incremented from 16-19 as expected.Helix log
Helix log is empty.
Platform
Linux
Terminal Emulator
Kitty
Helix Version
helix 22.08.1
The text was updated successfully, but these errors were encountered: