Skip to content

Instantly share code, notes, and snippets.

View usualwitch's full-sized avatar
🌸

Emmy Yuanwei Chen usualwitch

🌸
  • Harvard University
  • Cambridge, MA
View GitHub Profile
@usualwitch
usualwitch / terminal_vim.scpt
Created July 15, 2020 06:43
Automator application to open file in terminal vim.
on run {input, parameters}
set didThese to {}
repeat with f in input
set f to (f as text)
if f ends with ":" then
if f is in didThese then --check to see if we did this already
--ignore
else
tell application "Terminal"
do script "cd " & quoted form of POSIX path of f