Go to actual end of line when text is hidden under nowrap

77 Views Asked by At

so my question is quite straight forward, I want to use 0 and $ to go to the actual start/end of the line when I have the nowrap set. Basically nowrap's version for g0and g$ when wrap is set.

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

Have you ever tried:

g0 or g<Home>       When lines wrap ('wrap' on): To the first character of
            the screen line.  |exclusive| motion.  Differs from
            "0" when a line is wider than the screen.
            When lines don't wrap ('wrap' off): To the leftmost
            character of the current line that is on the screen.
            Differs from "0" when the first character of the line
            is not on the screen.

g$ or g<End>        When lines wrap ('wrap' on): To the last character of
            the screen line and [count - 1] screen lines downward
            |inclusive|.  Differs from "$" when a line is wider
            than the screen.
            When lines don't wrap ('wrap' off): To the rightmost
            character of the current line that is visible on the
            screen.  Differs from "$" when the last character of
            the line is not on the screen or when a count is used.
            Additionally, vertical movements keep the column,
            instead of going to the end of the line.
            When 'virtualedit' is enabled moves to the end of the
            screen line.