sponsor Vim development Vim logo Vim Book Ad

LimitWindowSize : Reduce the current window size by placing an empty padding window next to it.

 script karma  Rating 6/3, Downloaded by 1241  Comments, bugs, improvements  Vim wiki

created by
Ingo Karkat
 
script type
utility
 
description
DESCRIPTION
Text files that do not have "hard" word wrapping via embedded line breaks can
be cumbersome to edit in a wide editor window, as it is strenuous on the eyes
to jump back and forth between begin and end of the soft-wrapped lines.
The simplest solution is to resize the editor window (:set columns=80), but
one may still want to have the large editor size for other edited buffers that
benefit from the large screen real estate.

This plugin places an empty padding window next to the current window, thereby
reducing its size while maintaining the overall editor size.

USAGE
:LimitWindowWidth [{width}]
                        Limit the window width of the current window by placing
                        an empty padding window to the right. If there already
                        is a padding window, its size is adapted according to
                        'textwidth' / {width}, or removed if the width is so
                        large that no padding is needed.
 
install details
INSTALLATION
This script is packaged as a vimball. If you have the "gunzip" decompressor
in your PATH, simply edit the *.vmb.gz package in Vim; otherwise, decompress
the archive first, e.g. using WinZip. Inside Vim, install by sourcing the
vimball or via the :UseVimball command.
    vim LimitWindowSize*.vmb.gz
    :so %
To uninstall, use the :RmVimball command.

DEPENDENCIES
- Requires Vim 7.0 or higher.
- Requires the ingo-library.vim plugin (vimscript #4433), version 1.004 or
  higher.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
LimitWindowSize-1.01.vmb.gz 1.01 2013-11-29 7.0 Ingo Karkat - Add workaround for when a :LimitWindowWidth command is issued from a still minimized GVIM in the process of restoring its window. The check for the window width then needs to be delayed until after the VimResized event.
- Add dependency to ingo-library (vimscript #4433). *** You need to separately install ingo-library (vimscript #4433) version 1.004 (or higher)! ***
LimitWindowSize.vba.gz 1.00 2010-09-14 7.0 Ingo Karkat Initial upload
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github