Skip to content

Instantly share code, notes, and snippets.

@rbtnn
Created December 31, 2014 13:41
Show Gist options
  • Select an option

  • Save rbtnn/e3e5ff706ce83c56e805 to your computer and use it in GitHub Desktop.

Select an option

Save rbtnn/e3e5ff706ce83c56e805 to your computer and use it in GitHub Desktop.
RangePython
function! s:RangePython() range
let selected_lines = getbufline('%', line("'<"), line("'>"))
let cmd = 'python hoge.py'
let lines = split(system(cmd, join(selected_lines, "\n")), "\n")
call append('.', lines)
endfunction
command! -range RangePython :call <sid>RangePython()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment