sponsor Vim development Vim logo Vim Book Ad

mercury : execute any fragment of code directly from vim

 script karma  Rating 4/1, Downloaded by 129    Comments, bugs, improvements  Vim wiki

created by
Niels Madan
 
script type
utility
 
description
mercury allows you to take a fragment of code from some source (current line, selection, buffer), execute the code intelligently, and then write the result to some destination (message window, selection, register, new split).

Features include:

* choose the correct interpreter with the correct switches, given the filetype.
* execute it in a separate thread and terminate it after a timeout, so an endless loop will not freeze vim.
* some language specific smartness (e.g. handling imports).

Currently supports python, ruby and javascript (using node) with more to come soon, hopefully.

For more information, head over to github: https://github.com/nielsmadan/mercury
 
install details
mercury requires venom, which in turn requires vim to be compiled with python support (most vim distributions are). Vundle or pathogen are highly recommended for installation.

Vundle:

    Bundle 'nielsmadan/venom'
    Bundle 'nielsmadan/mercury'

For what it's worth, the order actually does not matter.

Pathogen:

Unzip mercury.zip and venom.zip into your pathogen directory. You can get venom from here: http://www.vim.org/scripts/script.php?script_id=4491
 

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
mercury.zip 1.0 2013-03-29 7.3 Niels Madan Initial upload
ip used for rating: 54.196.108.89

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