I ran into the issue where MacVim could not compile latex files using latex-box
under OSX Yosemite. This only occured when opening MacVim the most natural way
(at least for me): using Spotlight or double clicking. Opening with the
terminal (using mvim
etc) gave me no compile errors. There's a related
Github issue.
To fix this issue, I created a simple Automator workflow that acted as an
application and would run mvim
on a file received as input. This application
is available for download but I have also detailed how I created this app.
There are some limitations and restrictions I had to take; see below.
I open all latex files with Spotlight. To have all latex files open in this
Automator script, I pressed ⌘i
on a latex file and under open with selected
the attached file and hit "Change all".
- This application hangs while opening multiple files. It's best used only for compile.
- The attached application can not open without a file as input. Double clicking on the app will give you an error. I plan to use it by opening latex files with Spotlight (well, Alfred).
mvim
command is specific and hard-coded to/usr/local/bin/mvim
.- I assume you're using zsh; the Applescript at the heart of this runs
zsh -c "/usr/local/bin/mvim ..."
. This is thezsh -c
(with escaped quotes).