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.

Advertisements

5 Comments »

  1. Thanks, I was looking for it but I couldn’t find that command even on VIM documentation!

    Comment by Anderson — March 29, 2010 @ 11:18 am

  2. Awesome, just what I needed. you get the gold star award today.

    Comment by Dan — April 30, 2010 @ 4:51 pm

  3. Thanks a lot.
    As nice as Linux, vim etc. are, in most of the manuals or tutorials such basic commands have been ‘forgotten’. Just sad.

    Comment by Egon — September 1, 2010 @ 8:28 am

  4. Thanks. Very useful.

    Comment by Ashish Jain — January 24, 2011 @ 5:27 pm

  5. Brillant stuff!!! Nice work

    Comment by AbdulFattah Popoola — December 5, 2011 @ 4:45 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: