Skip to content

Instantly share code, notes, and snippets.

@willwright82
Forked from brablc/TerminalVim.scpt
Last active August 30, 2016 09:41
Show Gist options
  • Save willwright82/1a8c6e255347bca7f6ae353fe5804333 to your computer and use it in GitHub Desktop.
Save willwright82/1a8c6e255347bca7f6ae353fe5804333 to your computer and use it in GitHub Desktop.
Open Vim in Terminal (iTerm) from Finder
on run {input, parameters}
tell application "iTerm"
activate
if (count of windows) = 0 then
set t to (create window with default profile)
else
set t to current window
end if
tell t
tell current session
write text ("vim \"" & POSIX path of first item of input as text) & "\""
end tell
end tell
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment