Home Download Buy Blog Forum Support

Custom color schemes and *.tmLanguage

Custom color schemes and *.tmLanguage

Postby amsemy on Tue Mar 26, 2013 11:46 am

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

For examle:

1. Java.tmLanguage

Code: Select all
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

Code: Select all
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.
Attachments
java.PNG
Java
java.PNG (3.83 KiB) Viewed 1087 times
javascript.PNG
JavaScript
javascript.PNG (8.44 KiB) Viewed 1099 times
amsemy
 
Posts: 4
Joined: Tue Mar 26, 2013 7:20 am

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests