How to refresh Sublime Text 3 workspace color schemes?

前端 未结 3 2037
清酒与你
清酒与你 2021-02-14 17:09

When you save a project, Sublime Text will create a .sublime-workspace file. In this file, there is an array of buffers, and for each buffer there is a color_scheme property. Th

3条回答
  •  北荒
    北荒 (楼主)
    2021-02-14 17:53

    Windows 10 AppData-related Solution

    Please make sure that you are in a similar situation as me before trying this solution (see below). Steps:

    1. Note the language and package that the Error loading colour scheme reports (my case was: markdown and MarkdownEditing).
    2. Go to your AppData directory (type %AppData% in file explorer address bar).
    3. Open directory Sublime Text 3, or whatever your version is.
    4. Open the .sublime-settings file that matches the language from step 1.
    5. Remove any lines that refer to the package you noted from step 1.
    6. Remember that this file should be a properly formatted JSON file when you remove lines manually. Save this file and restart Sublime Text.

    Background

    I've decided to post here in case some of the python script solutions didn't work for you and your situation is similar to mine. I'm using GitHub to sync my Sublime Text AppData (Windows 10), in order to keep my workflow settings the same on multiple machines. Recently, I noticed that when I uninstalled a certain package on one of my machines, I accidentally merged some configuration files for that non-existent package on my other machine. This resulted in a persistent Error loading colour scheme, in particular for me when changing syntax to markdown (the package was MarkdownEditing for reference).

提交回复
热议问题