autoresize.vim


Ⅰ. 插件描述

Automatically Resizing Splitted Current Window Size Larger.

Ⅱ. 基本信息

创建日期:  2007-11-29
使用用户:  1
Github星:  4
插件作者:  omi taku

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Overview

This plugin updates vim splitted window size automatically large.
Current window size will be large, and the other window size will be
small.

Installation

  1. Copy the autoresize.vim script to the $HOME/.vim/plugin or
       the $HOME/vimfiles/plugin. Refer to the ':help add-plugin',

   ':help add-global-plugin' and ':help runtimepath' topics for
   more details about Vim plugins.

  1. Restart Vim.

Usage

  1. Split vim window, and so current window height or width is automatically
       updated with large value.
  2. You move cursor to the other window from one, the other window size is
       automatically updated.
  3. If you check this script,
       split vim window with ":split" or ":vsplit",

   and push <C-W><C-W><C-W><C-W><C-W><C-W>....

Configuration

  1. Minimum window size.
       Script use "g:AUTORESIZE_ANOTHER_WINDOW_HEIGHT" variables when you split window

   horizontally.  If you split window vertically then, script use
   "g:AUTORESIZE_ANOTHER_WINDOW_WIDTH" variables.
   These variables are used as the other window size parameter. (not a current)

   example.
       :let g:AUTORESIZE_ANOTHER_WINDOW_HEIGHT = 5
       :let g:AUTORESIZE_ANOTHER_WINDOW_WIDTH = 12

  1. Disable script defined autocommands.
       Script add 1 autocommand to your vim environment.

   If you want make this autocommand disable,
   set "g:AUTORESIZE_AUTOCMD_DISABLE" variables to "1".

   example.
       :let g:AUTORESIZE_AUTOCMD_DISABLE = 1

  1. Run autocommand in specific filetype.
       If you use this script only in some filetype, add this autocommand to your vimrc.

   example.
       :let g:AUTORESIZE_AUTOCMD_DISABLE = 1
       :autocmd WinEnter *.txt :AutoWindowResize

  1. Run script on your action
       If you run this script with some your action (for example, push F4),

   add this configuration to your vimrc.

   example.
       :let g:AUTORESIZE_AUTOCMD_DISABLE = 1
       :nmap <F4> :AutoWindowResize<CR>

Limitation

  1. This script will run only on 2 window. Vim run on 3 splitted window,
       on 4 splitted window, or on 1 window then, this script is not running.

添加新评论