Ⅰ. 插件描述
Vim and tmux, sittin' in a tree...Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'pdbradley/vim-tmux-runner-holy-ground'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'pdbradley/vim-tmux-runner-holy-ground'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'pdbradley/vim-tmux-runner-holy-ground'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/pdbradley/vim-tmux-runner
Ⅳ. 文档说明
VTR [Vim Tmux Runner]
This fork exists to simplify things; our team uses tmate (which makes detatching the runner impossible because tmate disables the 'break-pane' command).
Also we have found that if you manually exit from your tmux runner pane, you cannot open a new one.
To just simplify things, I'm removing some of the logic that checks to see if a tmux-runner pane exists; instead, if you want to make one, it will get made. The old one (if it exists) just becomes an extra pane. no harm done.
hats off to chris toomey and whoever he inherited from to make this. indispensable.
A simple, vimscript only, command runner for sending commands from vim to tmux.
Usage
VTR provides a handful of commands for managing and interacting with [tmux][],
the terminal multiplexer. The main command is:
VtrSendCommandToRunnerThis command will prompt for a command to run, then send it to the runner pane
for execution. If one doesn't currently exist, a new runner pane will be
- Subsequent calls to
VtrSendCommandToRunnerwill reuse the provided
command.
VTR provides configuration options that allow for control over the size and
location of the VTR runner pane. In addition, VTR provides commands to resize,
reorient, and even detach the runner pane making the interaction as painless as
possible.
For a complete summary of the available commands and configuration options in
VTR, check [the included doc file][].
Installation
The easiest way to install VTR is to add the git repo as a bundle, then use
[Pathogen][], [Vundle][] or similar plugin management option to add it to Vim's
runtime path.
cd ~/.vim
mkdir bundles # only
cd bundles
git clone https://github.com/christoomey/vim-tmux-runner.gitPython Notes
If you are using python, or any other language with syntactic whitespace, you
will likely want to change the following settings to better support the
required whitespace:
let g:VtrStripLeadingWhitespace = 0
let g:VtrClearEmptyLines = 0
let g:VtrAppendNewline = 1Additionally, if you are using ipython, you will need to ensure it is
installed with proper readline support. Ref [this Stack Overflow thread][] and
answer for more detail.
You will also need to start ipython with auto-indentation disabled, which can
be done with the following ipython --no-autoindent.
Inspiration
This plugin is heavily inspired by the functionality in the [Vimux][] plugin.
This plugin aims to implement a similar feature set while not requiring Vim
with ruby requirement. In addition a few new commands not found in Vimux have
been added to provide additional control over the tmux runner pane.