tags:

views:

615

answers:

2

I use MacVim as my editor within Xcode. By default Command-B and :make are bound to call 'make' from the command line. As we're using Xcode for building and project configuration, I'd like to replace the :make/Command-B calls to make with an applescript command. Is this possible, and how would I go about doing it?

+8  A: 

Try :help makeprg

You use :set makeprg=xxx to change the command that is executed.

DanM
That did the trick. Here's the final command in my vimrc:set makeprg=osascript\ -e\ \"tell\ application\ \\\"Xcode\\\"\"\ -e\ \"build\"\ -e\ \"end\ tell\"
Grant Limberg
I use vim on my mac, but rarely with Xcode. I will have to give it a try. Thx for the Xcode command.
DanM
A: 

In order to run an XCode build from CLI, the command is xcodebuild. I have never tried it inside vim, though.

riko