Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on run {input, parameters}
- set filename to POSIX path of input
- set fn2 to quoted form of filename
- set cmd to "cd `dirname " & fn2 & "` && vim " & fn2
- tell application "iTerm"
- activate
- delay 0.3
- tell application "System Events" to keystroke "b" using control down
- tell application "System Events" to keystroke "c"
- delay 0.5
- tell the current window
- tell the current session
- write text cmd
- end tell
- end tell
- end tell
- end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement