Adding syntax coloring to Xcode for unknown file extension such as “.tcl”

久未见 提交于 2019-11-29 08:50:58

Yes there is.

What you need to do is create a new macOS project in Xcode (I will call it SyntaxHighlighting:

Then go to Info -> Exported UTIs:

Click the plus button. Set the Identifier to something like com.umutkeskin.tcl-source.

The Conforms To section tells you what highlighting the UTI will use. You can see the full list of System-defined uniform type identifiers here. The one you want is com.apple.applescript.text.

Set the Extension to tcl. This sets the file extension that this UTI will be used on.

Now run the project, and... Viola!

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