Last active
June 5, 2016 05:58
-
-
Save zunda/7ed6f9b7add2c2945c9a to your computer and use it in GitHub Desktop.
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 | |
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 |
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 | |
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 |
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
#!/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