在Xcode 4.0中向编程语言添加语法高亮显示

时间:2021-10-14 22:30:22

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

有没有人知道是否可以在Xcode 4中添加自定义语法高亮显示?

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

在Xcode 3中,你只需要添加一些文件:

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

~ /图书馆/应用支持/开发/共享/ Xcode /规格/

but that does not seem to work anymore?

但这似乎不再起作用了?

3 个解决方案

#1


6  

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

使用XCode为lua https://github.com/bastos/lua- XCode着色。

#2


1  

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

我还没有尝试过,但我认为值得尝试一下(至少在XCode 4.3上):

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

1 - Go to /Contents/ otherframework /DevToolsCore.framework/ version /A/Resources/在XCode包内;

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

2 -查找文件“内置文件类型”。pbfilespec"和"标准文件类型。pbfilespec";

3 - Create backup copies of those files;

3 -创建这些文件的备份副本;

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;

4 -在“内置文件类型.pbfilespec”中插入语言语法。只需要使用C语言的定义,例如,作为模板并定义新的语言语法;

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;

5 -文件“标准文件类型”。“pbfilespec”似乎引用了“内置文件类型”。但这只是猜测。如果第4步还不够,还可以考虑编辑这个文件;

Hope it helps.

希望它可以帮助。

#3


-1  

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

版本4使用.dvtcolortheme文件,它们应该放在~/Library/Developer/Xcode/UserData/ fontandcolortheme中

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

solalize有一个小巧的教程:https://github.com/brianmichel/solarized/tree/master/apple-xcode4- sol。

#1


6  

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

使用XCode为lua https://github.com/bastos/lua- XCode着色。

#2


1  

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

我还没有尝试过,但我认为值得尝试一下(至少在XCode 4.3上):

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

1 - Go to /Contents/ otherframework /DevToolsCore.framework/ version /A/Resources/在XCode包内;

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

2 -查找文件“内置文件类型”。pbfilespec"和"标准文件类型。pbfilespec";

3 - Create backup copies of those files;

3 -创建这些文件的备份副本;

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;

4 -在“内置文件类型.pbfilespec”中插入语言语法。只需要使用C语言的定义,例如,作为模板并定义新的语言语法;

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;

5 -文件“标准文件类型”。“pbfilespec”似乎引用了“内置文件类型”。但这只是猜测。如果第4步还不够,还可以考虑编辑这个文件;

Hope it helps.

希望它可以帮助。

#3


-1  

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

版本4使用.dvtcolortheme文件,它们应该放在~/Library/Developer/Xcode/UserData/ fontandcolortheme中

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

solalize有一个小巧的教程:https://github.com/brianmichel/solarized/tree/master/apple-xcode4- sol。