Created
October 25, 2016 19:33
-
-
Save eckelon/d6e9d79b117a7ea013478eca10b4f0b1 to your computer and use it in GitHub Desktop.
adaptación del script de http://thepugautomatic.com/2015/02/open-in-iterm-vim-from-finder/ para abrir ficheros en vim + iterm2 desde el Finder o abrir una vim + iterm2 en blanco
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} | |
if input is equal to {} then | |
set cmd to "clear;cd `/Users/jasamitier`;vim " | |
else | |
set filename to POSIX path of input | |
set cmd to "clear;cd `dirname " & filename & "`;vim " & filename | |
end if | |
tell application "iTerm" | |
tell the current window | |
create window with default profile | |
tell the 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