Skip to content

Instantly share code, notes, and snippets.

@slonoed
Created October 26, 2016 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slonoed/b95e556648cb942563ce9df547efb91c to your computer and use it in GitHub Desktop.
Save slonoed/b95e556648cb942563ce9df547efb91c to your computer and use it in GitHub Desktop.
open file in vim in iterm2
on run {input, parameters}
set myPath to POSIX path of input
set cmd to "vim " & quote & myPath & quote
tell application "iTerm"
activate
set newWindow to (create window with default profile)
tell current session of newWindow
write text cmd
end tell
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment