【发布时间】:2013-08-07 00:18:49
【问题描述】:
您好,我正在为 ST3 开发一个 Maze 游戏/插件,我正在尝试为 unicode 字符和方括号添加一些颜色。 在some 阅读之后,我弄清楚了我需要做的大部分事情(tmLanguage 文件和语法)
我仍然不明白我在哪里有自定义十六进制颜色?
这是我尝试过但没有成功的方法:
maze.tmLanguage 中的第一名
<key>patterns</key>
<array>
<dict>
<key>comment</key>
<string>This pattern matches the walls of the maze</string>
<key>match</key>
<string>\[\]</string>
<key>name</key>
<string>entity.wall.mzl</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#BADA55</string>
</dict>
</dict>
<dict>
<key>comment</key>
<string>This pattern matches the player charactere</string>
<key>match</key>
<string>[\u25C4,\u25BA,\u25B2,\u25BC]</string>
<key>name</key>
<string>entity.player.mzl</string>
</dict>
<dict>
然后在 Walker.py
#load the maze color syntax
self.view.set_syntax_file("Packages/Walker/maze.tmLanguage")
【问题讨论】:
标签: syntax-highlighting sublimetext sublimetext3