sponsor Vim development Vim logo Vim Book Ad

Execute selection in Python and append : Execute a selection in Python and paste result after

 script karma  Rating 6/4, Downloaded by 713  Comments, bugs, improvements  Vim wiki

created by
Michal Gajda
 
script type
utility
 
description
This script executes a selection in Python and then pastes the result after that selection or replaces the selection. Useful for testing small software snippets and documenting them in the same buffer.

It is based on http://vim.wikia.com/wiki/Execute_Python_from_within_current_file
 
install details
Just put into your .vimrc and then use command :Pyea (appends) or :Pyer (replaces) .
 

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
pythonExecuteAppendOrReplace.vim 0.2 2009-10-19 7.0 Michal Gajda Now :Pyea appends after selection, and :Pyer replaces selection with results of Python snippet.
pythonExecuteAppend.vim 0.1 2009-10-18 7.0 Michal Gajda Initial upload
ip used for rating: 18.223.172.252

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