Better HN
topnewbestaskshowjobs
Log inSign up

RabidDartGunman

3 karma · joined Aug 8, 2022 (4y ago) · 5 submissions

Submissions

comment 2y ago · link · parent

Sometimes you can change the problem slightly to cater to one or more of the points on that list.

comment 4y ago · link · parent

Agreed, but more often, I find myself in a situation, where I just want to delete, comment, or yank a few lines of a function, so I find that going by relative line numbers is a lot more flexible and useful for me.

comment 4y ago · link · parent

Thank you for the great answer. I did not know that. I will try it out.

comment 4y ago · link · parent

Say I am at the last line of a part of a function, that I would like to delete - maybe some debug output. In VIM, I will look at the relative line numbers and immediately see that I would like to delete up to the number 8. Then I simply write d8<up> or d8h, and I am done.

As far as I can tell - I may be wrong - in Helix, I would have to first do 8<up> and then 9xd. Note the number 9 in there. This is due to the fact that in Helix, I have to count the number of lines I want to delete, rather than just being able to look at the relative line numbers.

comment 4y ago · link · parent

Helix is really great. If only it had a VIM (or VIM-like) mode available. I find the Kanoune shortcuts really limiting, as they fail to use the relative line numbers for anything except moving the cursor. Bidirectional selection, deletion, commenting, etc. is super useful when coding.