-
-
Save SilverEzhik/cec3f065e7ab7b93d9102df70fa60d9b to your computer and use it in GitHub Desktop.
Double click files to open them in vim in a new iTerm window.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
-- handle opening multiple files | |
set str to "" | |
repeat with i from 1 to length of input | |
set cur to item i of input | |
set str to str & " " & quote & POSIX path of cur & quote | |
end repeat | |
tell application "iTerm" | |
create window with profile "fast" -- use a profile with a lighter shell | |
tell front window | |
tell current session | |
write text ("vim" & str & "; exit") | |
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