-
-
Save willwright82/1a8c6e255347bca7f6ae353fe5804333 to your computer and use it in GitHub Desktop.
Open Vim in Terminal (iTerm) from Finder
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} | |
tell application "iTerm" | |
activate | |
if (count of windows) = 0 then | |
set t to (create window with default profile) | |
else | |
set t to current window | |
end if | |
tell t | |
tell current session | |
write text ("vim \"" & POSIX path of first item of input as text) & "\"" | |
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