Skip to content

Instantly share code, notes, and snippets.

@logston
Created May 5, 2020 23:51
Show Gist options
  • Select an option

  • Save logston/fc41fab5db95dc78574a8e8432bfd78f to your computer and use it in GitHub Desktop.

Select an option

Save logston/fc41fab5db95dc78574a8e8432bfd78f to your computer and use it in GitHub Desktop.
Small script to open file in Vim in Tmux in Terminal
on run {input}
set the_path to POSIX path of input
set cmd to "vim " & quoted form of the_path
tell application "Terminal"
activate
tell application "System Events"
keystroke "b" using {control down}
delay 0.1
keystroke "c"
keystroke return
end tell
do script "cd" in window 1
do script cmd in window 1
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment