Ⅰ. 插件描述
plugin for redirecting command outputⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/redircommands'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/redircommands'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/redircommands'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/RedirCommands
Ⅳ. 文档说明
The Vim command redir is very powerful. It allows you to process the output of commands in whatever way you desire, but it is cumbersome to use. The RedirCommands pulgin gives you all of the power without the trouble.
Functionality
:R <command>
Run command and redirect output to a split window.
:R function NERDComment
:R python print 'n'.join([str(x**2) for x in xrange(100)])
:RR <command> <destination>
Run command and redirect output to a destination. Destination can be a
register, global variable, or file. The destination string must not contain
spaces.
:RR highlight Comment @a
:RR highlight Comment =>g:hi_comment
:RR highlight Comment >hi_comment.txt
Options
g:redircommands_newbuffer_command
The command used to redirect output to a split window. The default is 'R'.
g:redircommands_general_command
The command used to redirect output to a specified destination. The default is 'RR'.