- Open Automator and create a new application. You can name it "TerminalVim"
- Works with any command basically, just change the following line
set q to "nvim " & quote & myPath & quote
to match what you want in the code below. For example:set q to "vim " & quote & myPath & quote
to use Vim instead of NeoVim. - Paste the following code:
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning