How to change background and text colors in Sublime Text 3

前端 未结 6 1978
借酒劲吻你
借酒劲吻你 2021-01-30 20:19

My questions are:

  • How do I change the overall colors (background and font)?
  • How do I change the colors based on the file type that is open?

6条回答
  •  [愿得一人]
    2021-01-30 21:14

    I had the same issue. Sublime3 no longer shows all of the installed packages when you choose Show Packages from the Preferences Menu.

    To customise a colour scheme do the following (UNIX):

    • Locate your SublimeText packages directory under the directory which SublimeText is installed in (in my setup this was /opt/sublime/Packages)
    • Open "Color Scheme - Default.sublime-package"
    • Choose the colour scheme which is closest to your requirements and copy it
    • From Sublime Text choose Preferences - Browse Packages - User
    • Paste the colour scheme you copied earlier here and rename it. It should now show up on your "Preferences - Color Scheme" menu under "User"
    • Follow the instructions at the link you previously mentioned to make the changes you require (Sublime 2 -changing background color based on file type?)

    --- EDIT ---

    For Mac OS X the themes are stored in zipped files so although the preferences file shows them as being in Packages/Color Scheme - Default/ they don't appear in that directory unless you extract them.

    • They can be extracted using the Package Resource Viewer (See this answer for how to install and use the Package Resource Viewer).
    • Search for Color Scheme in the Package Extractor (should give options for Color Scheme Default and Color Scheme legacy)
    • Extract the one you want. It will now be available at users/UserName/Library/Application Support/Sublime Text 3/Packages/Color Scheme - Default (or Legacy)
    • Make a copy of the scheme you want to modify, edit as needed and save it
    • Add or change the line in user preferences which points to the color scheme

    for example

    "color_scheme": "Packages/Color Scheme - Legacy/myTheme.tmTheme"
    

提交回复
热议问题