Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add PHP syntax coloring to XCode Apps
A previous hint discussed how to get PHP syntax coloring in Project Builder, and I wanted to do the same for XCode. I found a link buried in the comments of that previous MacOSXHint, pointing to this file:

www.knaub.info/Download/PB_PHP_Specifications.zip

This download provided two files (PHP.pbfilespec and PHP.pblangspec) meant to add PHP syntax coloring to Project Builder. I then located another site which had a patch for XCode to add C# syntax coloring:

www.druware.com/products/xcodetools.html

The differences in structure between the C# files and the PHP files were minimal, so I followed the instructions from the druware site using the files from the knaub site, and I now have PHP syntax coloring working properly in XCode! Life is good.

[robg adds: I haven't tested this one...]
    •    
  • Currently 3.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[41,498 views]  

Add PHP syntax coloring to XCode | 8 comments | Create New Account
Click here to return to the 'Add PHP syntax coloring to XCode' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Installation instructions
Authored by: timkingman on May 25, '04 11:19:12AM
To save you from downloading C# stuff you don't need just to get instructions:
mkdir -p ~/Library/Application\ Support/Apple/Developer\ Tools/Specifications
cd PB_PHP_Specifications
cp PHP* ~/Library/Application\ Support/Apple/Developer\ Tools/Specifications
To install for all users, leave out the ~ and copy to /Library/... Restart XCode when finished. My PHP was colored without these files, and I don't notice a difference after I installed them, so your mileage may vary...

[ Reply to This | # ]
Add PHP syntax coloring to XCode
Authored by: ppatoray on May 25, '04 12:27:42PM

I also already have code coloring for PHP in XCode, but the biggest feature I fell like I am lacking is the code navigation bar, so that I can flip through class definitions and functions easily. Do you know if this hint solves that problem and 'teaches' XCode what a php function looks like?



[ Reply to This | # ]
Nope
Authored by: TvE on May 25, '04 02:14:13PM

I am using Zend Studio - the best Mac OS X IDE for PHP development (I think!)



[ Reply to This | # ]
Add PHP syntax coloring to XCode
Authored by: twelvelabs on Sep 19, '04 05:48:11PM


		SourceScannerClassName = PBXJavaSourceScanner;

add that to the pbspecfile near the top after description.

-Skip



[ Reply to This | # ]
Add PHP syntax coloring to XCode
Authored by: jmil on May 25, '04 03:00:10PM

umm, syntax coloring already works in Xcode... just name the file with .php and you're all set. Am I missing something?



[ Reply to This | # ]
Add PHP syntax coloring to XCode
Authored by: robbevan on Jun 01, '04 05:14:31AM
If anyone's interested, here are ActionScript specification files for Xcode. Adds syntax colouring and code completion.

[ Reply to This | # ]
Add PHP syntax coloring to XCode
Authored by: bolverker on May 30, '05 12:38:32PM
I've created a package for XCode which enables PHP syntax coloring and project creation. It can be downloaded at: http://www.mr-technical.com/public/?q=node/13

[ Reply to This | # ]
Add PHP syntax coloring to XCode
Authored by: TCB13 on Jun 26, '10 11:31:40AM

All the links for the "style" files are down, can someone reup them please....?



[ Reply to This | # ]