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

后端 未结 1 796
春和景丽
春和景丽 2020-12-18 13:26

I want to ask a question about Xcode syntax coloring (highlighting). I am working with files all the time .tcl files all the time and Xcode does not know extens

相关标签:
1条回答
  • 2020-12-18 14:11

    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!

    0 讨论(0)
提交回复
热议问题