helix
helix copied to clipboard
feat(commands) increment by range
Increment increases the increment amount by 1 (or negative 1) for each value based on issue #3910.
This completely changes the way increment works, so maybe this is better as another command. I don't know what that would be though.
I think it'd be better to add this functionality into a seperate command, the default behaviour shouldn't be changed for a normal increment, as there a legitimate usecases for it.
also, once the increment counter hit 10+ the results get scewed heavily.
also, once the increment counter hit 10+ the results get scewed heavily.
I believe this issue may be corrected by #4123
I think it'd be better to add this functionality into a seperate command, the default behaviour shouldn't be changed for a normal increment, as there a legitimate usecases for it.
I agree. I'm trying to figure out which keymap to connect both of them two. Temporarily, I set it to Alt-a. Any suggestions?
I believe this issue may be corrected by https://github.com/helix-editor/helix/pull/4123
I hope I'm not causing bad merge conflicts.
@CBenoit I've changed the keymappings to be alt+ctrl
is this good to be merged?
I've changed the keymappings to be alt+ctrl
Is C-A (ctrl + shift) and C-X already reserved / taken? Because i think they'd make more sense...
Is C-A (ctrl + shift) and C-X already reserved / taken? Because i think they'd make more sense...
I've tried those keymaps but for some reason, they don't work. I'm guessing you can't pair (alt + shift) in the keymaps. Try it out and let me know if it works for you.
I don't think we implement the #
special register from Kakoune yet (https://github.com/mawww/kakoune/blob/master/doc/pages/registers.asciidoc#special-registers) but "#<C-a>
and "#<C-x>
could be an nice way to do this without needing to add a new command and keybind.
I don't think we implement the
#
special register from Kakoune yet (https://github.com/mawww/kakoune/blob/master/doc/pages/registers.asciidoc#special-registers) but"#<C-a>
and#<C-x>
could be an nice way to do this without needing to add a new command and keybind.
So should we close the PR until the special register is implemented? Or should this just be a temporary fix until then?
I think it would be ok to kind of hack it in this PR: in increment_impl
check the cx.register
to see if it's '#'
and if it is then increment by range number (multiplied by count?)
I think it would be ok to kind of hack it in this PR: in
increment_impl
check thecx.register
to see if it's'#'
and if it is then increment by range number (multiplied by count?)
Oh, I didn't even know we could see which register we're using. How about this? Does this look good?
@the-mikedavis How does it look now?
This is looking good 👍
Just needs a run of cargo fmt
I just ran the formatter.