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 the last 5 or 10 years!). When I open any editor in full screen, more than half the screen is completely empty. I’d like to be able to effectively use the rest of the screen by splitting it into two or three columns so I can see all much more of my code in a single screen.
Frankly, I’m surprised that other than Microsoft Word, I have never seen this functionality in any editor.
I found the following page (http://vim.wikia.com/wiki/View_text_file_in_two_columns) which seems to do what I want, but I don’t really understand what they are suggesting. I did set columns and scroll bind, but that didn’t seem to do anything.
I don’t normally use Vim, but if I can get access to this functionality, I’ll switch happily. I am currently on Ubuntu 10.10 (gnome). The default version of Vim seems to be 7.2 (/usr/bin/vim.gnome).
Just press
CTRL-W vand the file you are working on will be split into two separate independent columns. RepeatCTRL-W vas many times as you want.Set scrollbind:
set scrollbindto columns that you want to scroll in sync.For example:
Now, while you move on one column, the other one scrolls so as if the first column overflows the text to the second column.