Benaiah\’s Computer Experiences

February 21, 2009

Resizing Vertical Viewports in Vim

Filed under: Programming, Vim — Tags: , , , — Benaiah @ 1:06 pm

One way to make your use of Vim more efficient is to make use of viewports (splits).  This article from linux.com explains just about everything about how to used the viewports in vim.  However there is one thing it does not mention, and this is how to changed the width of a vertical viewport.  Here’s how.

Ctrl+w > widens the viewport  (Press Ctrl+w and then “>”)

Ctrl+w < narrows the viewport (Press Ctrl+w and then “<“)

As usual with vim you can also use modifiers  to chage how much you widen/narrow the view port.  For example, to widen it by a 10 instead of 1:

Ctrl+w 10> widens viewport by 10

The number can be replaced with any value and also applies to the narrow viewport command.

Create a free website or blog at WordPress.com.