Skip to content

hlissner/vim-forrestgump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

vim-forrestgump

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.

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"]
}

If no filetype is set, it will try to find a shebang line in the script.

Usage

nmap <leader>r      Run entire file (doesn't have to be saved)
vmap <leader>r      Run current or selected line(s)

About

Run inline code, run

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published