sponsor Vim development Vim logo Vim Book Ad

RedirCommands : plugin for redirecting command output

 script karma  Rating 0/0, Downloaded by 543  Comments, bugs, improvements  Vim wiki

created by
Scott Updike
 
script type
utility
 
description
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'.
 
install details
Extract the plugin files in your ~/.vim (*nix) or ~/vimfiles (Windows). You
should have 2 files:

    plugin/redircommands.vim
    doc/redircommands.txt

Next, to finish installing the help file run:

    :helptags ~/.vim/doc

Alternatively, and arguably preferably, use Pathogen and checkout the
vim-redircommands directory in your bundle directory. Then, run:

    :Helptags
 

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
redircommands.tgz 1.0.0 2015-03-01 7.0 Scott Updike Initial upload
ip used for rating: 142.132.191.50

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.
   
Vim at Github