Launch terminal program from macOS app
This only works with iTerm2, but I ended up using the following script I modified from one Stack Overflow that opens a new tab:

#!/usr/bin/env bash

osascript &lt;&lt;EOF
    tell application "iTerm"
        activate
        set win to create window with default profile
        tell current session of win
            select
            write text "vim '$1' &amp;&amp; exit"
        end tell
    end tell
EOF


This opens a new iTerm window, runs vim inside it, then exits the shell when vim exits.