Find the MacVim.app application under the $HOMEBREW_PREFIX which can be /opt/homebrew.
Confirm the $HOMEBREW_PREFIX path by running the following command:
$ echo $HOMEBREW_PREFIX
/opt/homebrew
In this case, MacVim is installed at /opt/homebrew/Cellar/macvim/ so find the MacVim.app under that folder instead of the usual /Applications folder.
For example, this particular version of MacVim can be found under /opt/homebrew/Cellar/macvim/9.0.1276/MacVim.app
Posted Sep 29, 2023.
https://www.darklaunch.com/2023/09/29/open-file-with-macvim-app.html
