Last active
August 29, 2015 13:57
-
-
Save zunda/9866352 to your computer and use it in GitHub Desktop.
An AppleScript to start vim inside iTerm
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
#!/usr/bin/osascript | |
on run argv | |
tell application "iTerm" | |
make new terminal | |
tell the last terminal | |
make new session | |
tell the last session | |
activate | |
exec command "vim " & argv | |
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
I don't understand why
make new session
creates another terminal when this script starts up iTerm2. If iTerm2 has already been running, this script creates one new terminal and starts a session with vim inside it as expected.