sponsor Vim development Vim logo Vim Book Ad

winresizer.vim : very simple vim plugin for easy resizing of your vim windows

 script karma  Rating 58/19, Downloaded by 484    Comments, bugs, improvements  Vim wiki

created by
simeji n
script type

Very simple vim plugin for easy resizing of your vim windows.

You can resize windows continuously by using typical keymaps of Vim. (`h`, `j`, `k`, `l`)  
The WindowResize mode makes your operation more quickly and more naturally.

## Demo

### For terminal vim



### For MacVim(gui vim)

* MacVim Window resize
* Vim window resize



## In default setting

1. You press keys `Ctrl + E` or execute `:WinResizerStartResize` on vim(in normal mode), to run this plugin

2. Start 'window resize mode', and you can resize current vim windows using 'h', 'j', 'k', 'l' keys

3. You want to finish resize mode, then press "Enter" key

4. If you cancel window resize, then press "q" key.
   You will get window size of before change

## Customize options

You can change setting and key mappings by using below options.(in your vimrc)

|variable name|default value|description|
   default: 1
   desc:    Use winresizer (If this value is 0, this plugin will not work)

   default: 0
   desc:    Use winresizer in GUI Vim (If this value is 0, this plugin will not work in GUI Vim such as Mac Vim)

   default: 1
   desc:    If this value is 1, window resize mode is finished(fixed) by `Esc`

   default: 10
   desc:    The change width of window size when `left` or `right` key is pressed

   default: 3
   desc:    The change height of window size when `down` or `up` key is pressed

   default: `Ctrl + e`
   desc:    Start window resize mode

   default: `Ctrl + a`
   desc:    Start window resize mode (in GUI Vim)

   default: 104(`h`)
   desc:    Expand window size to left

   default: 108(`l`)
   desc:    Expand window size to right

   default: 106(`j`)
   desc:    Expand window size to down

   default: 107(`k`)
   desc:    Expand window size to up

   default: 13(`Enter`)
   desc:    Fix and escape from window resize mode

   default: 113(`q`)
   desc:    Cancel and quit window resize mode

If you want to resize MacVim window itself, you must set below.

let g:winresizer_gui_enable = 1

#### _Example in your .vimrc_

If you use winresizer with default settings. Don't have to do any settings.

    " If you want to start window resize mode by `Ctrl+T`
    let g:winresizer_start_key = '<C-T>'
    " If you cancel and quit window resize mode by `z` (keycode 122)
    let g:winresizer_keycode_cancel = 122

=-=-= [ Cheat sheet ]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

keymap of [window resize mode] (default setting)

h : expand window size to left
j : expand window size to down
k : expand window size to up
l : expand window size to right
q : cancel resize window and escepe [window resize mode]
Enter : fix and escape


## Latest version (development version) and issues


## License
winresizer is released under the MIT license.
install details
Just copy this script files autoload/winresizer.vim and plugin/winresizer.vim within Vim's path.

If you are using Vundle or NeoBundle, just add the following line to your .vimrc:

(with Vundle)
Bundle 'simeji/winresizer.git'

(with NeoBundle)
NeoBundle 'simeji/winresizer.git'

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
winresizer.tar.gz 1.1 2016-02-27 7.0 simeji n add function resize for MacVim and other GUI Vim
winresizer.tar.gz 1.0 2013-07-05 7.0 simeji n Add g:winresizer_finish_with_escape option, and edited README.

If don't want to use this function, add below setting in your .vimrc, please.

let g:winresizer_finish_with_escape = 0
winresizer.tar.gz 0.1 2013-05-20 7.0 simeji n Initial upload
ip used for rating:

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.
SourceForge.net Logo