nomad


Ⅰ. 插件描述

Vim plugin to keep your environment variables in sync with tmux

Ⅱ. 基本信息

创建日期:  2014-03-16
使用用户:  2
Github星:  10
插件作者:  Bastian Winkler

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

nomad.vim

Using Vim in a remote tmux session is very convenient, because you can detach
the running session and resume it later without leaving Vim. This is great in
situations where you login with ssh into your development machine at work or
your server to continue coding after you changed your location.
But suddenly, when you try to access a git+ssh remote (maybe through tpope's
excellent fugitive plugin) or access
the quotestar or quoteplus registers, things won't work as expected because
with a new ssh connection some of your environment variables changed and Vim
doesn't know about it.
Fortunately tmux knows about these changes and this is where the nomad plugin
kicks in. It queries tmux for the new values and updates your environment in
Vim.

Installation

If you don't have a preferred installation method, I recommend installing
pathogen.vim, and then simply copy and
paste:

``
cd ~/.vim/bundle
git clone git://github.com/buztard/vim-nomad.git
``

Or for Vundle users:

Add Bundle 'buztard/vim-nomad' to your ~/.vimrc and then:

  • either within Vim: :BundleInstall
  • or in your shell: vim +BundleInstall +qall

Usage

Just run :UpdateEnv when you re-attached your tmux session from a different
ssh connection.

See :help nomad for details

添加新评论