sponsor Vim development Vim logo Vim Book Ad

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

 script karma  Rating 17/8, Downloaded by 221    Comments, bugs, improvements  Vim wiki

created by
jimsei n
 
script type
utility
 
description
winresizer.vim
========================

## In default setting

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

Start ‘window resize mode’, and you can resize current vim windows using ‘h’, ‘j’, ‘k’, ‘l’ keys

You want to finish resize mode, then press “Enter” key

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


If you don't need this function,
define global variable below in .vimrc

let g:winresizer_enable = 0



## Customize options ## ## ## ##

If you change setting and key mapping, can use below option.

{variable name}
  desc:    {description}
  default: {default setting}

g:winresizer_enable
   desc:    Use winresizer (If this value is 0, this plugin will not work)
   default: 1

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

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

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

g:winresizer_start_key
    desc:    Start window resize mode
    default: <Ctrl + e>

g:winresizer_keycode_left
    desc:    Expand window size to left
    default: 104  #  `h` key

g:winresizer_keycode_right
    desc:    Expand window size to right
    default: 108  # `l` key

g:winresizer_keycode_down
    desc:    Expand window size to down
    default: 106  #  `j` key

g:winresizer_keycode_up
    desc:    Expand window size to up
    default: 107  # `k` key

g:winresizer_keycode_finish
    desc:    Fix and escape from window resize mode
    default: 13    # `Enter` key

g:winresizer_keycode_cancel
    desc:    Cancel and quit window resize mode
    default: 113  # `q` key

#### _Example in your .vimrc_

    " 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]

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

https://github.com/jimsei/winresizer

## 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 'jimsei/winresizer.git'
'""---------------------------------------

(with NeoBundle)
""---------------------------------------
NeoBundle 'jimsei/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.0 2013-07-05 7.0 jimsei 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 jimsei n Initial upload
ip used for rating: 23.20.50.20

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