Last active
November 12, 2018 14:35
-
-
Save adow/47131a56663d8695dfac4b58dc50ecc1 to your computer and use it in GitHub Desktop.
Open file in iTerm vim for MacOS Mojave
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} | |
set filename to POSIX path of input | |
set cmd to "clear;cd `dirname " & filename & "`;vim " & quote & filename & quote | |
tell application "iTerm" | |
create window with default profile | |
set bounds of front window to {300, 30, 1000, 1000} | |
tell the current window | |
tell the current session | |
write text cmd | |
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