resizewin.vim


Ⅰ. 插件描述

A Vim plugin for resizing window without mouse.

Ⅱ. 基本信息

创建日期:  2013-07-17
使用用户:  1
Github星:  1
插件作者:  koturn

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'koturn/resizewin-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'koturn/resizewin-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'koturn/resizewin-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/koturn/resizewin.vim

Ⅳ. 文档说明

movewin.vim

This plugin enables resizing window without mouse.
After loading the script, do command :ResizeWin. Use hjkl and shift+hjkl keys to move the window, press any other key when done.
If you want to maximize window, do command :FullSize. The command: 'FullSize' is a toggle command, so after maximize the window,
do command :FullSize again, you can restore oeiginal window size.
This plugin can be used in CUI and GUI.

Screenshot (GIF animation)

Key-bind Interface

This plugin provides interface for key-bind.
You can use it as follow.

nmap <S-Left>   <Plug>(resizewin-contract-x)
nmap <S-Down>   <Plug>(resizewin-expand-y)
nmap <S-Up>     <Plug>(resizewin-contract-y)
nmap <S-Right>  <Plug>(resizewin-expand-x)
map  <F11>      <Plug>(resizewin-full)
map! <F11>      <Plug>(resizewin-full)
map  <M-F11>    <Plug>(resizewin-full)
map! <M-F11>    <Plug>(resizewin-full)

If you want to change the expansion/contraction width/height, set your favorite values to global variables as follow.

let g:resizewin#resize_width  = 3  " the default value is 1.
let g:resizewin#resize_height = 3  " the default value is 1.

Install

If you use NeoBundle for a plugin manager,
write following code in .vimrc and do command :NeoBundleInstall.

NeoBundleLazy 'koturn/resizewin.vim', {
      \ 'autoload' : {
      \   'commands' : ['ResizeWin', 'FullSize'],
      \   'mappings' : [
      \     '<Plug>(resizewin-contract-x)',
      \     '<Plug>(resizewin-expand-y)',
      \     '<Plug>(resizewin-contract-y)',
      \     '<Plug>(resizewin-expand-x)',
      \     '<Plug>(resizewin-full)',
      \]}}

If you use other plugin manager or don't use it, I'm sorry, but please install this plugin on your own.

添加新评论