Vitality


Ⅰ. 插件描述

Make Vim play nicely with iTerm 2 and tmux.

Ⅱ. 基本信息

创建日期:  2012-04-12
使用用户:  406
Github星:  306
插件作者:  Steve Losh

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Vitality

(Vit)ality is a plugin that makes (V)im play nicely with (i)Term 2 and
(t)mux.

Features

Vitality restores the FocusLost and FocusGained autocommand functionality.
Now Vim can save when iTerm 2 loses focus, even if it's inside tmux!

It also handles switching the cursor to a bar shaped one when in insert mode,
and restoring it when not.

Pull requests for other helpful behavior are welcome.

Installation and Usage

Use Pathogen to install.

You shouldn't need to do anything else, but you can read :help vitality if
you're curious.

Note on later versions of tmux (1.9.x or higher)

If you find that FocusLost events are not working in later versions of tmux
try adding the following line to your .tmux.conf.

set -g focus-events on

Don't forget to restart all your tmux sessions for this setting to take effect
(or just run the command in tmux itself to avoid having to restart).

License

MIT/X11

添加新评论