Created
November 12, 2015 19:53
Revisions
-
mstroeck created this gist
Nov 12, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ on run {input, parameters} set cmd to "vim -c startinsert" if input is not in {} then set myPath to POSIX path of input set cmd to "vim " & quote & myPath & quote end if tell application "iTerm" activate set myTerm to (current terminal) try tell myTerm set mySession to (make new session at the end of sessions) tell mySession to exec command cmd end tell on error set myTerm to (make new terminal) tell myTerm set mySession to (make new session at the end of sessions) tell mySession to exec command cmd end tell end try end tell end run