Created
April 12, 2021 12:23
-
-
Save iurysza/2b97a040974d23f5ba8eeaacc7760320 to your computer and use it in GitHub Desktop.
Script to open a file in vim. Can be used with mac's Automator to create an application and set as the default app of some file extension.
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 characters
on run {input, parameters} | |
set myPath to POSIX path of input | |
set cmd to "vim " & quote & myPath & quote | |
tell application "iTerm2" | |
tell current window | |
create tab with default profile | |
tell 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