helix icon indicating copy to clipboard operation
helix copied to clipboard

Allow C-u / C-d to travel to extents

Open lukepighetti opened this issue 2 years ago • 2 comments

In Helix if you page up/down you cannot navigate to the first or last line of the file

In Neovim you can

https://user-images.githubusercontent.com/666539/198398499-4dd8dc17-e11c-438f-af39-28ce535a5b87.mov

lukepighetti avatar Oct 27 '22 21:10 lukepighetti

On it!

Manosmer avatar Nov 04 '22 11:11 Manosmer

Honestly I've always wanted to submit this issue but wasn't sure if this is by design (i.e. moving view instead of cursor). I frequently find myself going half page down (C-d), centering view (zz), and everything stays exactly the same as before, when I was actually intending to move my cursor by half page.

Maybe @archseer can kindly shed some light on this? Thanks!

xJonathanLEI avatar Nov 06 '22 07:11 xJonathanLEI

I agree with this as well.

I ended up being confused for half an hour why I couldn't use the shortcut I created to move easier (I had the same shortcut in vim).

I usually set C-d and alike to center the view after moving to keep the cursor centered which I find helps me a lot to move after I reach near where I want.

MAST1999 avatar Dec 19 '22 16:12 MAST1999

@MAST1999 I also prefer that approach. The closest action I figured out:

[keys.normal]
C-d = ["half_page_down", "goto_window_center"]
C-u = ["half_page_up", "goto_window_center"]

dv1x3r avatar Dec 19 '22 17:12 dv1x3r

Fixed on #5420 by accident (but we decided to keep it)

pascalkuthe avatar Apr 04 '24 01:04 pascalkuthe