Open lf94 opened 3 years ago
You mean like gl
? I'm having trouble envisioning what you mean.
Currently you can view a long line one character at a time with l
or vl
, or zip right to the end with gl
, but if the line is more than one screen wide you'll miss whatever's in-between.
If I edited files with long-lines with any regularity, it might be nice to have a horizontal equivalent of <c-u>
, <c-d>
, <c-f>
, <c-b>
.
@Screwtapello has expressed what I mean perfectly.
For reference, Vim has motions like zL
and zH
(docs) to scroll half a screen width, which is what I used to use.
That makes sense. It seems related to #3649 in that it depends on the screen width. I thought earlier i heard that this was a non-starter because of how the internals worked, but it seems like it is available in the %val{window_width}
variable. Maybe that could be combined with %val{window_range}
or %val{cursor_display_column}
to do a version of this as a plugin
It's worth noting that kak has the (imo annoying) invariant that the main selection is always on the screen, and you can't have a cursor where there are no characters, so it is impossible to do a version of this that just scrolls the whole screen right because the cursor might be on a short line and would get left behind. But just jumping the cursor to the edge of the window should be relatively easy using the variables above
@QuinnFreedman just as a note, I intend to relax that invariant which I think should only apply whenever we do some modification to the buffer or move the selections.
Feature
When pressing some key, the cursor goes past the edge of the window so you can read the rest of the line.
Usecase
Makes it much easier to read lines which go beyond the window, instead of mashing
w
or similar.