Skip to content

Instantly share code, notes, and snippets.

@t9md
Created November 5, 2010 03:02
Show Gist options
  • Save t9md/663588 to your computer and use it in GitHub Desktop.
Save t9md/663588 to your computer and use it in GitHub Desktop.
manupilate iTerm from Vim (short version)
ruby << ENDRUBY
require 'rubygems'
require 'appscript'
ENDRUBY
fun! ITermWrite(cmd)
ruby Appscript.app('iTerm').current_terminal.sessions.write(:text => VIM::evaluate('a:cmd'))
endfun
command! -nargs=? RakeOnIterm :call ITermWrite("rake " .<q-args>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment