How can I edit my code in Vim by displaying it in any number of columns?
My laptop and desktop monitors are widescreen (I suspect that is true of most monitors made in t
Just press CTRL-W v
and the file you are working on will be split into two separate independent columns. Repeat CTRL-W v
as many times as you want.
Set scrollbind: set scrollbind
to columns that you want to scroll in sync.
For example:
vim afile # Open a file
^w v # split it
gg # go to top
:set scrollbind # bind this one
^w l # go to the new split
L # go to bottom of this split
zt # make it the top line
:set scrollbind # bind with this one
Now, while you move on one column, the other one scrolls so as if the first column overflows the text to the second column.