Ⅰ. 插件描述
Run a shell command from within vim and see the output in a new windowⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'phodge/vim-shell-command'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'phodge/vim-shell-command'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'phodge/vim-shell-command'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/phodge/vim-shell-command
Ⅳ. 文档说明
# vim-shell-command
Run a shell command from within vim and see the output in a new window
How to use it
To run the man test and see the output in a new window, use:
:Shell man test
You will notice that the new buffer contains a line starting with## Shell: followed by the command you requested. You can edit this
line and then use F5 to re-run the new command.
Options
By default, the output of your shell command will be filtered through col -b
to strip out terminal escape sequences (such as colors). You can disable this
behaviour using the following variable:
let g:shell_command_use_col = 0
You can re-run the shell command by pressing F5 while your cursor is in the
shell window. If you would like to use an alternate key for the mapping, add
this global variable to your .vimrc
let g:shell_command_reload_map = "<F10>"