Sublime Forum

Custom color schemes and *.tmLanguage

#1

Some patterns in *.tmLanguage files have similar names, making it difficult to create a custom color schemes.

For examle:

1. Java.tmLanguage

679: <dict> 680: <key>match</key> 681: <string>\?|:</string> 682: <key>name</key> 683: <string>keyword.control.java</string> 684: </dict> 685: <dict> 686: <key>match</key> 687: <string>\b(return|break|case|continue|default|do|while|for|switch|if|else)\b</string> 688: <key>name</key> 689: <string>keyword.control.java</string> 690: </dict>

“? :” operator can not be separated from the some reserved words.

2. JavaScript.tmLanguage

558: <dict> 559: <key>match</key> 560: <string>\b(delete|in|instanceof|new|typeof|with)\b</string> 561: <key>name</key> 562: <string>keyword.operator.js</string> 563: </dict> ... 636: <dict> 637: <key>match</key> 638: <string>!|\$|%|&amp;|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|&lt;=|&gt;=|&lt;&lt;=|&gt;&gt;=|&gt;&gt;&gt;=|&lt;&gt;|&lt;|&gt;|!|&amp;&amp;|\|\||\?\:|\*=|(?&lt;!\()/=|%=|\+=|\-=|&amp;=|\^=|\b(in|instanceof|new|delete|typeof|void)\b</string> 639: <key>name</key> 640: <string>keyword.operator.js</string> 641: </dict>

Some keywords can not be separated from symbol operators.



0 Likes