5
votes

How can I modify the Monokai color scheme to highlight the braces in \[math\] and \(math\) for latex in Sublime Text?

1

1 Answers

5
votes

I realize this is an old question; however:

If you highlight the brace, and press:

ctrl+shift+alt+p (for Windows/Linux), or
⌃+⇧+P (for OSX)

The scope of the bracket will be displayed in the status bar at the bottom of the screen. An example of this: if I highlight self in Python and use that command, the relevant scope is variable.language.python. This is found at the end of the scope listing.

ie: scope.python variable.language.python --> Take the last element.

From here, you can use Package Resource Viewer to open up the Monokai.tmTheme file, located in Color Scheme - Default, and modify it with something like the following:

<dict>
    <key>name</key>
    <string>Call it something</string>        <!-- USE YOUR NAME -->
    <key>scope</key>
    <string>variable.language.python</string> <!-- USE YOUR SCOPE -->
    <key>settings>/key>
    <dict>
        <key>foreground</key>
        <string>#000000</string>              <!- PROVIDE HEX RGB COLOR -->
    </dict>
</dict>

Save the .tmTheme file, and the braces should now be modified to whatever color you selected.

References:

How to change default code snippets in Sublime Text 3?