Is it possible to scroll down the left and right parts of a vertically split window in Vim? I have two files I would like to compare roughly. Each line of these files looks almost the same.
To move between splits first press Ctrl-w (I remember this by Control Window, I'm not sure what the official mnemonic is) Then press a directional key to move the cursor to the split you're interested in. Directional key could be the arrows or my preferred home row method.
Splitting Vim Screen Horizontally To split the vim screen horizontally, or open a new workspace at the bottom of the active selection, press Ctrl + w , followed by the letter 's' .
Go to the first split, and type in
:set scrollbind
Go to the next one (ctrl+w), and do the same.
To disable:
:set noscrollbind
For more info, check the documentation for scroll binding - http://vimdoc.sourceforge.net/htmldoc/scroll.html#scroll-binding
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