evil-helix icon indicating copy to clipboard operation
evil-helix copied to clipboard

Make move_visual_line_* commands with <count> move by actual line, instead of visual line

Open antoyo opened this issue 8 months ago • 3 comments

(I originally opened this issue upstream, but it was rejected. There's some more context in their FAQ. This is something that can be configured in vim, so I'm still suggesting this feature for evil-helix.)

Hi. I'm not sure exactly how I achieved this setup in vim, but when I do j, it moves by 1 visual line, while when I do <count>j, it moves by actual lines. I find this convenient because I usually care about relative line numbers only when I use a count.

Perhaps a generic solution to this problem would be to allow different commands to be set depending on whether a count is used or not, but this could be confusing.

Thanks.

antoyo avatar May 03 '25 21:05 antoyo

I would like to implement this, so I wonder what is your opinion on this. Would you like this? If so, how would you like to see this implemented?

antoyo avatar May 14 '25 10:05 antoyo

Thank you very much for offering to work on this!

I think this could be implemented in a pretty non-invasive way, which is important: Implement an own command, with the main implementation (if it's more than a 3-4 lines of code) in evil.rs.

I haven't had a look at the relevant functions, but I don't think upstream Helix has ready-to-use functions to replicate this behavior, so I think we won't get around implementing the command ourselves.

Either way, it sounds like a nice addition: It brings us closer to Vim without being invasive (i.e. causing "friction").

usagi-flow avatar May 22 '25 19:05 usagi-flow

I think this could be implemented in a pretty non-invasive way, which is important: Implement an own command, with the main implementation (if it's more than a 3-4 lines of code) in evil.rs.

Hi @usagi-flow, That would be a nice part of a "Contribution" guide. Should I refactor all my PRs to move large code to evil.rs, even if some needs a lot of external imports? Thanks

badranX avatar May 23 '25 07:05 badranX