I’m using VS Code and I’m trying to set the editor.background color according to the file path of the opened document.
So far, I installed Peacock:
{
"settings": {
"peacock.favoriteColors": [
{
"name": "Flutter",
"value": "#0C1E28FF"
},
{
"name": "Server",
"value": "#240A0AFF"
}
]
}
}
Is there a way to distinguish which open file belongs to which folder, by assigning a specific color to the editor.background
key?
Note that I don’t want to create different workspaces, as the various folders share same resources.
2
Answers
If you want to change the background color ,you can add some commands in settings.json .By doing this you can change the background color depending on the folders.Here you need to use command palette while opening the file.This will set the color according to the folder.
for example:
In settings.json
Ctrl+shift+P then run Change Color of Active Worksapce. When you want to change the color, by selecting the myColor from list you can change the color.
As for as I know,I wrote this.If there are any mistakes please forgive me in advance.
You can use an extension I wrote: When File
Example from the doc: