[TriLUG] vim -- restricting current buffer to 80 columns without editing a different file or a copy of the current buffer

Kevin Hunter hunteke at earlham.edu
Wed Apr 16 21:11:53 EDT 2008


Andrew Ball wrote:
> I'm trying to use vim in full screen mode (which is more than 80
> characters in my setup), but I insist on limiting my lines to 80
> characters.  I want a way to get vim to have a buffer on the left
> that's 80 characters wide and an empty buffer on the right.
> 
> :80 vsplit

You got the split.  To make the other view blank, you might try:

Ctrl+w w      (switch to next view)
:e asdlkjkfh  (i.e. edit new file)
Ctrl+w w      (switch focus to first view)

or you can add new buffer:

:badd "Buffername"
:bnext        (to switch to new buffer in new view)
Ctrl+w w      (switch focus to first view)

HTH,

Kevin



More information about the TriLUG mailing list