First, you should know the goal is to replace the .json code of your chosen Material Theme (which I have included in this repository) with the code from one of the default VS Code themes. This way, whenever you select that specific default theme in the program, your chosen Material Theme will be applied instead.
Some features and scripts, such as color accents, may not work as before, and will appear with default settings.
Use the links to jump directly to any section:
-
Choose Your Favorite Material Theme
First, select your preferred Material Theme from the files in this repository -
Locate the VS Code Default Themes Folder
Next, you can find the VS Code default themes folder in this directory:C:\Users\Your-user-name\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions(Or the equivalent path on your system, make sure to replace
"Your-user-name"with your actual username.)Within this directory, there are several subfolders whose names start with
theme-. These are the default themes we are looking for. Almost every theme has a corresponding name in the application. -
Choose the Default Theme to Replace
Now, pick a default theme folder (e.g.,theme-defaults) and open it. Note the name of the.jsonfile in its themes subfolder. -
Replace or overwrite the file
Next, you will need to edit the.jsonfile in the ‘themes’ folder that you open in this step. At this point, we have two options:
Option 1 : Edit the Existing File, Alternatively, you can copy all the code from your chosen Material Theme and paste it into the default theme's .json file in the 'themes' folder, then save it using an IDE.
Option 2 : Copy and Replace the File, Rename the chosen Material Theme .json file to the exact name of the default theme's .json file in the 'themes' folder and replace the existing file.
(You may need to run File Explorer as administrator because permission issues)
Now you can select the edited theme in the application and enjoy!
I recommend these two additional steps to prevent potential issues caused by updates:
On Windows: Right-click on the edited .json file > Select Properties > Mark "Read-Only"
On Linux: Run in the terminal:
sudo chmod 444 /path/to/your/file.jsonThis can be easily find by searching for "customizations" in the application settings:
"update.mode": "manual",
"extensions.autoCheckUpdates": false,
"extensions.autoUpdate": falseAdditionally, if you want to turn off extension recommendations, you can add the following lines to your settings.json:
"extensions.ignoreRecommendations": true,
"extensions.showRecommendationsOnlyOnDemand": trueAttention: Don't forget to check for updates manually if you're doing this.
Be sure to save the files externally. You may need to redo this process if you ever have to recreate the setup.
We will follow the same steps as in Windows, but using terminal commands for a more direct and efficient approach.
-
Choose Your Favorite Material Theme
Select your preferred Material Theme from the files in this repository. -
Locate the Default Themes Folder
Find the default theme you want to replace it with in the following directory:/usr/share/code/resources/app/extensions/(Or the equivalent path in your system)
Within this directory, you will find several folders whose names start with
theme-. These are the default themes linked to the application. After selecting the default VS Code theme you want to replace, open its folder and look for the subfolder named ‘themes’. Make sure to remember the exact directory path and the.jsonfile name (actually copy this and use it from the clipboard later). -
Replace or overwrite the File
replacing files or overwrite the codes via copy & paste. In this guide, Examples below useMaterial-Theme-Ocean.jsonreplacingkimbie-dark-color-theme.jsonintheme-kimbie-dark/themes/. You can follow these steps with your chosen theme’s name. You may need to adapt the commands depending on your distribution or preferred method.
Option 1 : Edit the existing file via Copy & Paste, Open the file with a text editor like nano:
sudo nano /usr/share/code/resources/app/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.jsonOnce the file opens, paste the copied code into it and save the file by pressing Ctrl + O and exit.
Option 2 : Replacing the File, Navigate to this repository's folder in the terminal(open Terminal there).
To replace the themes file, use the following command:
sudo cp Material-Theme-Ocean.json /usr/share/code/resources/app/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json(Pay attention to the name of the destination file if you're using different stuff)
Restart VS Code and select the modified theme.
If you are on macOS, the process is similar to Linux; the default path is /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/, Use sudo for commands.
---
Ensure don't miss the Additional Steps to Prevent Potential Issues mentioned above.
Thanks for your attention ❤️