regRedir.vim


Ⅰ. 插件描述

Vim plugin to redirect command output into a register

Ⅱ. 基本信息

创建日期:  2002-08-29
使用用户:  1
Github星:  1
插件作者:  Guido Van Hoecke

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/regredir-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/regredir-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/regredir-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/regRedir.vim

Ⅳ. 文档说明

" Description: This plugin defines a 'Redir' command that takes a register
" and one or more {bar} separated commands. This command will execute
" these commands and collect their output into the specified register.
" The resulting register could than be inserted anywhere with a :put
" The register must always be specified, and is the first character
" of the command argument. The remainder of the argument is the command
" to be captured. This command may be separated from the register with
" a space. Several commands can be specified, but have to be separated
" with a bar:
"
" :Redir {reg} {cmd} [ | {cmd} [ | {cmd} ... ] ]
"
" Examples:
" 1) Simple case of one command (e.g. :version) to be captured into
"    register v
"     :Redir vversion
" or
"     :Redir v version
" 2) Example of two commands (ls and set) to be collected into
" register p
"     :Redir p ls | set
" or
"     :Redir pls|set
" 3) Example of a command (g/exe) to be appended to register x
"     :Redir Xg/exe
" or
"     :Redir X g/exe
"

添加新评论