Edit in MacVim Context Menu

I like to have a right click menu option for editing files in MacVim. Fortunately, this is easily done with Automator. Unfortunately its not easy to copy from computer to computer when I’m setting up a new computer

open Automator and create a new Document with the Quick Action template

Workflow receives current -> Files or Folders -> in -> Finder.app

add the step Run Shell Script

Pass input as arguments

In the menu, select Save…

the name you put into the “Save quick action as” window is the name that will appear in the context menu. I chose “Edit in MacVim”

 

 

Now jump on over to System Preferences -> Keyboard -> Shortcuts. on the left, select services, and then on the right look through and make sure that the newly created action is checked.

 

 

I’ve experimented with running /usr/local/bin/mvim instead of open but I found that doing so causes the script to not finish running until macvim closes

Leave a Comment

Your email address will not be published. Required fields are marked *