Horizontal navigation in long lines

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…

Leave a Comment