Skip to content

Run scripts through filter and display output in separate window

Notifications You must be signed in to change notification settings

vim-scripts/RunView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a mirror of http://www.vim.org/scripts/script.php?script_id=2511

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)

About

Run scripts through filter and display output in separate window

Resources

Stars

Watchers

Forks

Packages

No packages published