How to edit Sublime Text 3 Soda Theme
Categories:
Customizing the Sublime Text 3 Soda Theme: A Comprehensive Guide

Learn how to personalize the Sublime Text 3 Soda Theme by editing its .sublime-theme
files and understanding the UI component structure. This guide covers everything from locating theme files to applying custom styles.
The Soda Theme for Sublime Text 3 is a popular choice among developers for its clean and modern aesthetic. While it offers a great out-of-the-box experience, many users wish to tweak its appearance to better suit their personal preferences or integrate with specific color schemes. This article will guide you through the process of customizing the Soda Theme, focusing on how to identify and modify its UI elements using .sublime-theme
files.
Understanding Sublime Text Themes
Sublime Text themes are defined by .sublime-theme
files, which are essentially JSON files containing rules for styling various UI components. These components include the sidebar, tabs, status bar, scrollbars, and more. Unlike color schemes (which define syntax highlighting), themes control the editor's chrome.
When Sublime Text loads, it reads these theme files to render the user interface. To customize a theme, you typically need to locate its theme files, understand their structure, and then override specific rules. It's crucial to avoid directly modifying the original theme files, as your changes would be overwritten during theme updates. Instead, we'll use a method that allows for safe overrides.
flowchart TD A[Start Sublime Text] --> B{Load User Preferences} B --> C{Identify Active Theme} C --> D[Locate Theme Files (.sublime-theme)] D --> E{Parse Theme JSON} E --> F{Apply UI Styles} F --> G[Render Editor UI] G --> H{User Interaction} H --> I{Update UI (if needed)} I --> G
Sublime Text Theme Loading Process
Locating and Extracting the Soda Theme Files
Before you can edit the Soda Theme, you need to find its files. Themes are usually installed as .sublime-package
files, which are essentially ZIP archives. To access the individual theme files, you'll need to extract them.
- Open Sublime Text.
- Go to
Preferences > Browse Packages...
This will open thePackages
directory in your file explorer. - Navigate up one level to the parent directory, which usually contains
Installed Packages
. - Find
Theme - Soda.sublime-package
(or similar, depending on the exact Soda theme variant you have, e.g.,Theme - Soda Dark.sublime-package
). - Copy this file to a temporary location.
- Change its extension to
.zip
(e.g.,Theme - Soda.zip
). - Extract the contents of the ZIP file. You'll find a folder named
Theme - Soda
(or similar) containing the.sublime-theme
files and associated assets (like images). - Create a new folder in your
Packages
directory (e.g.,Packages/User/Soda Custom
). Copy the extracted contents into this new folder. This ensures your customizations are separate from the original theme.
Packages/User
directory for your modified theme files. This prevents conflicts with future theme updates and makes your customizations easier to manage.Identifying UI Components for Customization
The core of theme customization lies in understanding which JSON properties control which UI elements. Sublime Text themes use a hierarchical structure, and many elements are identified by their class
property. For example, a sidebar label might have a class like sidebar_label
.
To find out which properties to modify, you can inspect the .sublime-theme
files you extracted. Look for JSON objects with a class
property that corresponds to the UI element you want to change. Common elements include:
sidebar_container
sidebar_tree
sidebar_label
tab_control
tab_label
status_bar
scroll_area
button_control
Each of these classes will have properties like bg
, fg
, border_color
, font.size
, font.face
, content_margin
, etc., which you can adjust.
[
{
"class": "sidebar_label",
"color": [150, 150, 150],
"font.size": 11,
"font.face": "Source Code Pro"
},
{
"class": "tab_control",
"content_margin": [10, 5],
"tint_index": 0,
"layer0.texture": "Theme - Soda/Soda Dark/tab_bg.png",
"layer0.tint": [40, 40, 40]
}
]
Example of theme rules in a .sublime-theme
file.
Applying Your Customizations
Once you've identified the properties you want to change, you'll create your own custom .sublime-theme
file. This file will contain only the rules you wish to override. Sublime Text merges theme definitions, so your custom rules will take precedence.
Create a new file in your custom theme folder (e.g.,
Packages/User/Soda Custom/Soda Dark Custom.sublime-theme
).Copy the specific JSON objects (rules) you want to modify from the original Soda theme file into your new custom file. Make sure it's a valid JSON array.
Modify the values of the properties within these copied objects.
Save the file.
Activate your custom theme in Sublime Text by going to
Preferences > Settings
and adding or modifying the"theme"
setting in yourUser
preferences file:{ "theme": "Soda Dark Custom.sublime-theme" }
Restart Sublime Text or save your
User
preferences file to apply the changes.
.sublime-theme
file is valid JSON. A syntax error can prevent Sublime Text from loading the theme correctly, potentially reverting to the default UI.1. Locate Original Theme Files
Navigate to Preferences > Browse Packages...
, then go up one level to Installed Packages
. Find Theme - Soda.sublime-package
and copy it.
2. Extract Theme Contents
Rename the copied .sublime-package
file to .zip
and extract its contents into a new folder, for example, Packages/User/MySodaTheme
.
3. Create Custom Theme File
Inside your new custom theme folder, create a new .sublime-theme
file (e.g., MySodaTheme.sublime-theme
). This will hold your overrides.
4. Identify and Modify UI Elements
Open the original Soda theme files (from the extracted .zip
) and find the JSON objects corresponding to the UI elements you want to change. Copy these objects into your custom theme file and adjust their properties (e.g., color
, font.size
).
5. Activate Custom Theme
Open Preferences > Settings
and set the "theme"
property in your User
preferences to the name of your custom theme file (e.g., "theme": "MySodaTheme.sublime-theme"
). Save the file and restart Sublime Text.