こんにちは、ST3 用の迷路ゲーム/プラグインを開発しています。Unicode 文字と角かっこに色を追加しようとしています。いくつか読んだ後、私がしなければならないことのほとんどを理解しました(tmLanguageファイルと構文)
私がまだ理解していないのは、カスタムの 16 進数の色がどこにあるのかということです。
これが私が試したものですが、成功しませんでした:
最初に 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")