Skip to content

Instantly share code, notes, and snippets.

@thadeu
Created January 28, 2020 14:10
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 thadeu/9715f40563dba4b9c18fab114ea49dea to your computer and use it in GitHub Desktop.
Save thadeu/9715f40563dba4b9c18fab114ea49dea to your computer and use it in GitHub Desktop.
on run {input, parameters}
set paths to ""
repeat with i from 1 to length of input
set cur to item i of input
set paths to paths & " " & quote & POSIX path of cur & quote
end repeat
set cmd to "vim -p" & paths
tell application "iTerm"
set created to false
if not (exists current window) then
create window with profile "Default"
set created to true
end if
tell current window
if not created then
create tab with profile "Default"
end if
tell current session
activate
write text cmd
end tell
end tell
end tell
end run
@thadeu
Copy link
Author

thadeu commented Jan 28, 2020

MacOs Mojave Version 10.14.6

@thadeu
Copy link
Author

thadeu commented Jan 28, 2020

Using iTerm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment