4

How to get CodeIntel working in Sublime Text on OSX

Posted in Uncategorized

SublimeCodeIntel is perhaps the most useful and heavily installed package for Sublime Text but it’s also very difficult to get working. The most common issue people run into is the dreaded endless

Info: processing `PHP’: Please wait…

This can be fixed by navigating to the SublimeCodeIntel package directory and running build.sh. For build.sh to compile we first need to install two things: pcre and XCode Command Line Tools. Annoyingly this is around 1.6GB of files!

 

Installing XCode Command Line Tools

Head over here and click View in Mac App Store. Hit install and watch your progress in the Purchases tab.

Once installed open it up and go to XCode – Preferences – Downloads – Components and install Command Line Tools.

 

Installing pcre

This little script is required by the scintilla package of SublimeCodeIntel. First install MacPorts then run:

sudo port install autoconf
sudo port install pcre
sudo cp /opt/local/include/pcre.h /usr/include/

You’re done! Navigate to the SublimeCodeIntel package directory and run sh src/build.sh. If all goes well at the end of compilation you’ll see a done! message. Restart Sublime Text and you’re good to go.