settingsvisual-studio-codevs-color-theme-editor

VS Code, changing the color theme


Whenever I try to change the theme in Vs code, it displays an error message "unable to write into user settings" and asks me to make changes using settings.json.


Solution

  • From your post it's impossible to determine why is VS Code not permitted to write to the settings file. It is possible your settings file is write-protected, the Code's process doesn't have sufficient write permissions or there is a third-party application preventing Code from writing to the file.

    However, you can always edit your settings file manually. Depending on your system, you can find the file in the following locations, as described in the Code's documentation:

    Considering Code itself is having issues writing to the file, I'd recommend trying a different text editor to edit the file. To change your theme, simply add the following key-value pair to the JSON dictionary:

    "workbench.colorTheme": "<the name of your desired theme>"
    

    ... so for example:

    "workbench.colorTheme": "Default Dark+"
    

    Also make sure all key-value pairs in the JSON file are separated with a comma, otherwise you'd get a syntax error the next time Code will try to parse your settings file. You can find more about Code's themes in the documentation.

    And while you are working directly with the settings file, I'd recommend checking its properties to see what could be preventing Code from writing into it. This shouldn't happen under normal circumstances.