Monday, August 06, 2007

Split windows leaving you in splits?

Vim supports opening multiple files as split windows. You invoke that using :sp filename

However, sometimes one needs to keep multiple files open, and yet see enough number of lines for the current buffer. One has to press Ctrl-W 10+ or something along these lines to increase the height of the current window. Of course, you can use tabs, but I am yet to make that jump and have not seen a compelling need for it yet.

Instead of this, you can set an option in vim or in your .vimrc file like
set winheight=20

This will ensure that the minimum window height for the buffer you are currently viewing is 20 lines.

No comments: