Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modify Monokai Color Scheme in Sublime Text

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

like image 238
Rud Faden Avatar asked Oct 23 '14 10:10

Rud Faden


People also ask

How do I customize the color scheme in Sublime Text?

To create a user-specific customization of a color scheme, create a new file with the same filename as the color scheme, but save it in the Packages/User/ directory. For example, to customize the default Monokai color scheme, create a file named Packages/User/Monokai. sublime-color-scheme.

Where Are Sublime Text color schemes stored?

Color schemes are XML formatted files located at the Packages folder with color schemes. They are an awesome way for the customization of Sublime text colors, unlike themes which are specific to UI elements. You can choose color schemes using option Preferences → Color Scheme.

What is Monokai color scheme?

Monokai Pro is a color scheme and customized user interface theme for code editors. It has been designed with beautiful functionality in mind. Carefully selected shades of colors are the foundation of an uncompromising, non-distractive user interface. Monokai Pro is available for Sublime Text and Visual Code.

How do I change the sidebar color in Sublime Text 3?

The most recent version of Sublime has fixed this issue, click on Preferences, click on Theme select Adaptive. sublime-theme. This will change the sidebar to a dark colored background. This answer really helps because without adding anything you can change the sidebar appearance.


1 Answers

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?

like image 178
maccartm Avatar answered Oct 28 '22 23:10

maccartm