sponsor Vim development Vim logo Vim Book Ad

RunView : Run scripts through filter and display output in separate window

 script karma  Rating 16/4, Downloaded by 706    Comments, bugs, improvements  Vim wiki

created by
Charles Campbell
 
script type
utility
 
description
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)
 
install details
vi RunView.vba.gz
:so %

(you need to have   filetype plugin on   in your .vimrc, too)
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
RunView.vba.gz 3 2013-11-25 7.3 Charles Campbell various bugfixes
RunView.vba.gz 2 2009-02-02 7.0 Charles Campbell some bug fixes.
ip used for rating: 54.91.135.161

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo