Skip to content

Instantly share code, notes, and snippets.

@zunda
Last active June 5, 2016 05:58
Show Gist options
  • Save zunda/7ed6f9b7add2c2945c9a to your computer and use it in GitHub Desktop.
Save zunda/7ed6f9b7add2c2945c9a to your computer and use it in GitHub Desktop.
on run
tell application "iTerm"
activate
make new terminal
tell the last terminal
make new session
tell the last session
activate
exec command "/Users/zunda/local/bin/vim-scratch"
end tell
end tell
end tell
end run
on run
tell application "/Applications/iTerm.app"
set myWindow to (create window with default profile command "/Users/zunda/local/bin/vim-scratch")
tell myWindow
activate
end tell
end tell
end run
#!/bin/sh
path=/tmp/scratch.`date +%H%M%S`.txt
pbpaste > $path
/usr/bin/vim -c 'set enc=utf8 fenc=utf8' $path
cat $path | pbcopy
sleep 0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment