Ⅰ. 插件描述
Execute vim buffer in the shell and view output in split paneⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'jarrodctaylor/vim-shell-executor'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'jarrodctaylor/vim-shell-executor'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'jarrodctaylor/vim-shell-executor'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/jarrodctaylor/vim-shell-executor
Ⅳ. 文档说明
# vim-shell-executor
A simple way to execute Vim buffer contents with a shell command and view the results in a split window.
I find this most useful for SQL queries however, this will work with any program that can be called from the shell.
The Plugin In Action

How It Works
The plugin provides two commands:
ExecuteBuffer
ExecuteSelctionThese commands allow you to execute either the entire buffer or the visually selected region. The first line
passed to the plugin is the shell command that will be used to run the remaing lines of code. For example,
to run a mysql query, the first line connects to the database and the remaining lines are the query being executed.
The example shown in the .gif above:
mysql -t -u root example
select * from mysql_example_table;Installation
Use your plugin manager of choice.
git clone https://github.com/JarrodCTaylor/vim-shell-executor ~/.vim/bundle/vim-shell-executor
- Add
Plugin 'https://github.com/JarrodCTaylor/vim-shell-executor'to .vimrc - Run
:PluginInstall
- Add
- Add
NeoBundle 'https://github.com/JarrodCTaylor/vim-shell-executor'to .vimrc - Run
:NeoBundleInstall
- Add
- Add
Plug 'https://github.com/JarrodCTaylor/vim-shell-executor'to .vimrc - Run
:PlugInstall
- Add