Adding syntax highlighting to programming languages in Xcode 4.0

狂风中的少年 提交于 2019-12-17 18:27:57

问题


Does anyone know if it's possible to add custom syntax highlighting to Xcode 4?

In Xcode 3 you just had to add some files in:

~/Library/Application Support/Developer/Shared/Xcode/Specifications/

but that does not seem to work anymore?


回答1:


XCode syntax coloring for lua https://github.com/bastos/lua-xcode-coloring




回答2:


I haven't tried that, but I think it's worth trying the following (at least on XCode 4.3):

1 - Go to /Contents/OtherFrameworks/DevToolsCore.framework/Versions/A/Resources/ inside the XCode package;

2 - Find the files "Built-in file types.pbfilespec" and "Standard file types.pbfilespec";

3 - Create backup copies of those files;

4 - The language syntax should be inserted in the file "Built-in file types.pbfilespec". Just take the definition of C language, for instance, as a template and define the new language syntax;

5 - The file "Standard file types.pbfilespec" seems to make reference to the file "Built-in file types.pbfilespec", but that's just a guess. If step 4 is not enough, consider editing this file too;

Hope it helps.




回答3:


Version 4 uses .dvtcolortheme files and they should be placed into ~/Library/Developer/Xcode/UserData/FontAndColorThemes

Solarized has a nice and small tutorial: https://github.com/brianmichel/solarized/tree/master/apple-xcode4-solarized



来源:https://stackoverflow.com/questions/5269994/adding-syntax-highlighting-to-programming-languages-in-xcode-4-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!