obvious-resize


Ⅰ. 插件描述

A plugin for easy resizing of Vim windows.

Ⅱ. 基本信息

创建日期:  2011-08-23
使用用户:  23
Github星:  21
插件作者:  Alexandru Tica

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Obvious Resize

This plugin aims to provide an easy way of resizing Vim windows/splits. It
may also seamlessly integrate with tmux, when the same resize keys are used.

Alt text

Just add the following into your .vimrc file:

noremap <silent> <C-Up> :<C-U>ObviousResizeUp<CR>
noremap <silent> <C-Down> :<C-U>ObviousResizeDown<CR>
noremap <silent> <C-Left> :<C-U>ObviousResizeLeft<CR>
noremap <silent> <C-Right> :<C-U>ObviousResizeRight<CR>

Specifying the Resize Amount

Windows get resized 1 line by default, which you can change in your .vimrc file:

let g:obvious_resize_default = 2

Like most Vim commands, you can prefix your command with an optional count: 5<C-Up> will resize by 5 lines.

You can also specify a count in your remap:

noremap <silent> <C-Up> :<C-U>ObviousResizeUp 5<CR>

If you'd like to have tmux integration (by default is disabled), then you may
use the following variable:

let g:obvious_resize_run_tmux = 1

添加新评论