RunView


Ⅰ. 插件描述

Run scripts through filter and display output in separate window

Ⅱ. 基本信息

创建日期:  2009-02-02
使用用户:  2
Github星:  2
插件作者:  Charles Campbell

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

RunView runs user-selected lines, selected either via a range provided to the RunView command or by visual-line selection (V), through a filter.  By default, the filter is ksh; however, the runview-filtcmd can be set (let g:runview_filtcmd="someotherfilter") in your <.vimrc> to override this.  The RunView command lets you specify the filter on the command line, too.

The output is placed in a separate window; it is horizontally or vertically placed.  Source code is left unchanged and visible.

Without the !, the RunView command uses horizontally adjacent windows.  With the !, the RunView command uses vertically stacked windows.

As an example, consider the file:

echo "one"
echo "two"
echo "three"

Using

:%RunView! ksh

the source code window is left on top, but the results of filtering the three lines is shown below it:

echo "one"
echo "two"
echo "three"
-------------
RunView ksh Output Window
=== 01/02/05 06:07:08 ===
one
two
three

RunView provides a title and a separator.  Subsequent applications of RunView will append a new separator line plus the new filter output.

(alpha/beta version available at http://www.drchip.org/astronaut/vim/index.html#RUNVIEW)

添加新评论