4

VimDiff seems to be a useful tool, but I can't seem to find a way of quickly and efficiently scrolling horizontally when word-wrap is set to "off". I am currently using "zh" and "zl" but they only work per click.

I'd rather not use sublime for diffing, but I just might have to!

2 Answers2

2

There are other options than just zh and zl; check out zH and zL to jump half screen at a time, or zs and ze to move to the start and end of the line, respectively.

Even better, if your limitation is worst during when using vim -d: set the windows to all scroll together with :scrollbind (check out all the options with :help scrollbind).

Curious: is it work that does not let you use word wrapping, and why? :)

I don't know if this would work, but :setglobal textwidth=foo (or :setlocal) might also be useful, given your limitations ...

egbutter
  • 136
0

you can remap Shif-MouseWheel events to horizontal scroll in .vimrc:

map <S-ScrollWheelUp> <ScrollWheelLeft>
map <S-ScrollWheelDown> <ScrollWheelRight>

So MouseWheel will move vertically and Shift+MouseWheel will scroll horizontally