Sublime Forum

ST4: Variable names in JS files now the same colour as the background

#1

Similar to a lot of people, yesterday I updated my Sublime installation after being prompted, and got version 4. I spent most of the day working in PHP, so didn’t notice this until today, but: all of my variable names in JS are now the exact same colour as the background:

If I select the block, you can (just) make out the variable names.

I have the One Dark Theme/Color Scheme installed, and if I switch to a different color scheme (e.g. Monokai) they come back… but I kinda love the One Dark theme and want to stick with it.

I’m guessing this is a similar issue to this thread, but I have no clue about editing themes for ST or where to look to tweak this (and having looked at the theme file, it is pretty big).

Does anyone have any ideas?

0 Likes

#2

I know this is an old support request, but as a fellow user of this theme I finally got sick enough of this problem to bother fixing it.

Thankfully the fix is trivial:

  1. Choose Customize Color Scheme from the Sublime Text Preferences menu
  2. Click anywhere on the left side of the split (One Dark.tmTheme)
  3. Open the Command Palette (e.g. Cmd+Shift+P) and choose Plugin Development: Convert Color Scheme to .sublime-color-scheme from the list
  4. Save the resulting theme. It should default to your User packages folder.

Thankfully you don’t need to change the theme definition itself at all.

2 Likes

#3

This was an issue that drove me insane for months. Hopefully it will help someone else.
What worked for me:

  1. Choose Customize Color Scheme from the Sublime Text Preferences menu
  2. Click anywhere on the left side of the split ( One Dark.tmTheme )
  3. Search for <string>subl_new js vars</string> Should be line 777.
  4. Prepend a ‘#’ to the start of <string>adb7c9</string> to make it like this
    <string>#adb7c9</string>
  5. Save. Alternatively, change the color to whatever you wish.

It seems like the author missed out on the hashtag causing the variable color to take the default background color.

1 Like