How can I do the following:
zw
(analogy to zl
but jump on words)I have .vimrc
settings set nowrap
. That's because the code looks nicer than wrapped lines. But there is a problem with horizontal navigation.
I noticed that zl
(don't confuse l (L) with 1) shortcut which shifts to the right (zh
to the left).
Did you try :help scroll-horizontal
?
You could use a mapping to scroll, for example, 20 characters to the left or to the right:
map <C-L> 20zl " Scroll 20 characters to the right map <C-H> 20zh " Scroll 20 characters to the left
Without applying a mapping, you could use zL
to move the view a half screenwidth to the right and zH
to do it to the left.
Regarding the second part of your question: I don't think that this is possible. You could yank the whole line, paste it into a second (scratch) buffer and scroll there. This would work as long as you're just reading the lines. Problems will arise as soon as you want to change something. But it's quite cumbersome...
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