vim-forrestgump : Run code inline and on-the-fly in vim. Inspired by TextMate's ⌘R.
script karma |
Rating 25/7,
Downloaded by 1218 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Henrik Lissner |
|
script type |
utility |
|
description |
One thing I miss from textmate? ⌘R and ⌥⌘R.
The former would run the current script and display output in a separate window. The latter would run selected code (or the current line).
This simple plugin aims to mimic that.
LANGUAGES SUPPORTED
The following interpreters should work out of the box (and can be changed to your liking):
let g:forrestgumps = {
"php": ["php", "<?php "],
"python": ["python"],
"ruby": ["ruby"],
"perl": ["perl"],
"javascript": ["node"],
"coffee": ["coffee"],
"sh": ["sh"],
" Example:
"&filetype": ["/usr/bin/&filetype", "Prepend this to code"]
}
KEYMAPS
nmap <leader>r Run entire file (doesn't have to be saved)
vmap <leader>r Run current or selected line(s) |
|
install details |
Unzip the tarball, and put the files into their respective ~/.vim/* folders. Alternatively, I'd recommend Vundle (https://github.com/gmarik/vundle), then all you'd need is:
Bundle "hlissner/vim-forrestgump"
Then restart and run:
:BundleInstall |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 44.220.184.63
|