Ⅰ. 插件描述
Vim plugin for handling tmux panes.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'mhinz/vim-tmuxify'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'mhinz/vim-tmuxify'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'mhinz/vim-tmuxify'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/mhinz/vim-tmuxify
Ⅳ. 文档说明
# vim-tmuxify
This is a shiny Vim plugin for handling tmux panes from within Vim!
Features:
- create/kill associated panes
- associate tmuxify to already existing panes
- send visually highlighted lines to the associated pane
- send to pane by prompting for input
- send to pane by setting a run command for the current filetype
- once set, run commands are remembered, but can easily be reset
- all the plugin configuration happens in one dictionary that holds filetypes as
keys and run commands as values
__NOTE__: This plugin needs tmux 1.6 with a certain patch level. You're safe
with versions 1.7+.
Feedback, please!
If you use any of my plugins, star it on github. This is a great way of getting
feedback! Same for issues or feature requests.
Thank you for flying mhi airlines. Get the Vim on!
Installation
If you have no preferred installation method, I suggest using tpope's pathogen:
- git clone https://github.com/tpope/vim-pathogen ~/.vim/bundle/vim-pathogen
- mkdir -p ~/.vim/autoload && cd ~/.vim/autoload
- ln -s ../bundle/vim-pathogen/autoload/pathogen.vim
Afterwards, installing tmuxify is as easy as pie:
- git clone https://github.com/mhinz/vim-tmuxify ~/.vim/bundle/vim-tmuxify
- start Vim
- :Helptags
- :h tmuxify
Options
Put these variables into your vimrc for great enjoyment. The shown examples
are also the default values.
let g:tmuxify_custom_command = 'tmux split-window -d'Use this option if you want to overwrite that default command for creating a new
pane.
(Examples are given in :h tmuxify-options)
let g:tmuxify_map_prefix = '<leader>m'What to start mappings with. Set it to '' to disable mappings.
let g:tmuxify_run = {}Set run commands for specific filetypes. '%' will be replaced by the full path
to the current buffer.
Example:
let g:tmuxify_run = {
\ 'sh': 'bash %',
\ 'go': 'go build %',
\}Mappings
<leader>mnExecutes TxCreate. Creates a new pane and associates with it.
<leader>mqExecutes TxKill. Closes the associated pane.
<leader>msExecutes TxSend. Prompts for input and sends it to the associated pane. This
mapping also works on visual selections.
<leader>mrExecutes TxSendKey. Prompts for input and sends it to the associated pane as keys.
<leader>mkExecutes TxRun. Prompts for input if there is no entry in g:tmuxify_run for
the current filetype. '%' will be replaced by the full path to the current
buffer.
<leader>mtExecutes TxSetRunCmd. Change the run command for the current filetype.
<leader>mpExecutes TxSetPane. Associate an already existing pane with tmuxify. Note: You
can use tab completion here.
<leader>mcExecutes TxClear. Sends ctrl+l to the associated pane.
<leader>mbExecutes TxSigInt. Sends ctrl+c to the associated pane.
Documentation
:h tmuxify
Author
Marco Hinz <mh.codebro@gmail.com>
James Baumgarten (current maintainer)
License
Copyright © Marco Hinz. Distributed under the same terms as Vim itself. See:help license.