vZoom


Ⅰ. 插件描述

A small vim plugin to quickly maximize/unmaximize the current window

Ⅱ. 基本信息

创建日期:  2016-01-14
使用用户:  8
Github星:  7
插件作者:  Kabbaj Amine

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vZoom - Quickly maximize & unmaximize the current window

Badge version
License version

Description

This plugin allows to maximize/unmaximize the current window:

  • Manually

    ![vZoom demo](.img/demo.gif "vZoom usage demo")
    
  • Or automatically:

    ![Auto-zoom demo](.img/autozoom.gif "Auto-zoom demo")
    

Mappings

No mapping by default, define your own.
e.g.

nmap gsz <Plug>(vzoom)

Use it to maximize/unmaximize your current window.
Even quicker, just leave the maximized window and it will get its initial size back.

Commands

You can enable automatic zoom with:

:VZoomAutoToggle

For disabling it, you can either use the command above or the <Plug>(vzoom) key mapping.

Installation

Copy the distributed files into Vim runtime directory which is usually ~/.vim/, or $HOME/vimfiles on Windows.
Or in a better way, use a vim plugin manager.

e.g with Vim-plug plus lazyloading:

Plug 'KabbAmine/vZoom.vim', {'on': ['<Plug>(vzoom)', 'VZoomAutoToggle']}

Configuration

The plugin's configuration is stored in one global dictionnary g:vzoom.

To define/modify an option you can either:

let g:vzoom = {}
let g:vzoom.option1 = 'foo'
let g:vzoom.option2 = 0

Or:

let g:vzoom = {
            \ 'option1': 'foo',
            \ 'option2': 0
        \ }

Options

optiondescriptiondefault
equalise_windowsEqualise size of windows (<C-w>=) after unmaximizing0

N.B

  • The plugin uses setwinvar() function to set back the initial size of the window, but unfortunately sometimes it can fail. So to prevent strange behavior, always set g:vzoom.equalise_windows to 1.
  • For the same reason above, when using VZoomAutoToggle and disabling auto-zoom the windows are always resized equally regardless of the g:vzoom.equalise_windows value.

Notes

Thanks to Bram Moolenaar for creating the best piece of software in the world :heart:

Thanks to you if you're using vZoom.

License

MIT

添加新评论