sponsor Vim development Vim logo Vim Book Ad

selection_eval.vim : Evaluate the statements which you select with visual mode.

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

created by
shunsuke tsutsui
 
script type
utility
 
description
Evaluate the statements which you select with visual mode.

Commands:
vmap <c-e><c-r> evaluate with using ruby.
vmap <c-e><c-l> evaluate with using perl.
vmap <c-e><c-p> evaluate with using python.
vmap <c-e><c-s> evaluate with using shell(bash)
vmap <c-e><c-v> evaluate with using vim.

you need to install the interpreter which you want to use.

Usage:
1. press <ctrl> + v
2. select the snippets with visual mode.  cf) echo "hello world"
3. press <c-e><c-v> or :EV (evaluate by vim.)
4. you get the result in the another buffer.
5. when you press the <e-c>c or :ECL, the result buffer is closed.

Reference: dbext.vim

I use this scripts on FreeBSD5.4 and cygwin. (vim6.3)
 
install details
cp selection_eval.vim $HOME/.vim/plugin
 

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
selection_eval.vim 0.1 2005-12-12 6.0 shunsuke tsutsui Initial upload
ip used for rating: 216.73.216.208

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github