How to move to end of a screen line in vim with set virtualedit=all
and set wrap
when a long line is splited into several screen lines?
I want a shortcut, l
not count.
g$
brings you to the end of the current screen line. You're right that :set virtualedit=all
changes that to the last possible screen column, even if that doesn't physically exist in the file (which is what virtual edit is about). With normal, single-space word spacing, you could correct that via gEl
(back to end of last word + right), but for the general case, you will have to (temporarily) unset 'virtualedit'
. This shortcut works:
g$:set ve= ve=all<CR>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With