Skip to content

Instantly share code, notes, and snippets.

@eckelon
Created October 25, 2016 19:33
Show Gist options
  • Save eckelon/d6e9d79b117a7ea013478eca10b4f0b1 to your computer and use it in GitHub Desktop.
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
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