On Sep 18, 2009, at 4:49 PM, [email protected] wrote:


On 11 Sep 2009, at 04:21, Christophe Dutang wrote:

Does someone know if there is a way Xcode highlights the R syntax? just like aquamacs does?

I think that's something you'd have to do yourself. It involves creating two files, e.g.

R.xclangspec
R.pbfilespec

that include the keywords and directions to Xcode. I don't know the details of the internals of these files, but you can Google the terms "xclangspec" and "pbfilespec". I'm attaching two files that you can use as a starting point (I copied the python files to use as a template). I haven't been able to get them to work though. Finally, you'll need to install them in:

~/Library/Application Support/Apple/Developer Tools/Specifications


Thats not where I find such files on my system. All the .xclangspec files are in one directory
~me$ find /Developer -name \*.xclangspec
/Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/ Resources/Ada.xclangspec /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/ Resources/BaseSupport.xclangspec /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/ Resources/C++.xclangspec
Snipped remaining 20 or so versions

Some of the .pbfilespec files are there althought there a acouple of other spots as well:

~me$ find /Developer -name \*.pbfilespec
/Developer/Applications/Dashcode.app/Contents/Frameworks/ CYKit.framework/Versions/A/Resources/Cayenne.pbfilespec /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/A/ Resources/Built-in file types.pbfilespec /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/A/ Resources/Standard file types.pbfilespec /Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/ Resources/Interface Builder File Types.pbfilespec /Developer/Library/Xcode/Plug-ins/XdesignCompilerPlugin.xcplugin/ Contents/Resources/Xdesign file types.pbfilespec

I think. :)

Let us know if you can get it to work.

When I drag those two files to that directory, Xcode does some highlighting but only of non-reserved words and comments, and also does "(" and "{" matching if you move the cursor forward over a ")" or "}", but not if the cursor is moved backwards.) Also shows some code completion. I'm not sure what was _supposed_ to happen, but I do see some behavior that suggests _some_ of those efforts were having a desired effect.

--
David.


Cheers,
Demitri

< R .pbfilespec ><R.xclangspec>_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to