Sublime Forum

White_space "dots" Too Opaque Since Update to Build 3170

#1

In my settings I have “draw_white_space”: “all”. Since updating to Build 3170 however, I’ve had to turn it off after trying for hours to get the white-spaces in comments to be less intrusive. It’s become very easy to confuse them with periods by accident. I tried editing the opacity of the invisibles parameter within the Monokai color scheme to no avail. Below I’ve included screenshots on Windows 10 which clearly show the difference in opacity for white-spaces in comments before and after the update.

0 Likes

#2

changing the opacity of invisibles should work - how did you edit it? using PackageResourceViewer?

maybe you have a package installed that has made a copy of the color scheme, and has configured ST to use it, so it is not picking up your changes?

0 Likes

#3

Changing invisibles in the colour scheme works. I think that in previous builds, an automatic opacity of (say) 70% of the invisibles colour was assumed and opacity didn’t work. Whereas in 3170, opacity is configurable and has changed. And for those upgrading, particularly in the transition to the new sublime-color-scheme format opacity has changed hence the OP’s problem.

Modifying the invisibles key and adjusting opacity got me back to my previous (subdued) whitespace presentation.

0 Likes

#4

Precisely. Although the scheme is now using the new “Monokai.sublime-color-scheme” format. Regarding your concern of other pluigins interfering, I was able to modify the parameters highlighted below (for reference), but not the one I need.

0 Likes

#5

Thank’s for your reply! Would you mind please describing how to go about doing that in “Monokai.sublime-color-scheme”?

0 Likes

#6

Assuming Monokai in Windows, small adjustments needed for Mac/Linux:

  1. In the packages folder, open Color Scheme - Default.sublime-package in your favourite zip tool (I use 7zip)
  2. Extract Monokai.sublime-color-scheme to your Data\Packages\User folder. We’ll modify this version, which will override the package version.
  3. Open the file in Sublime. Find the subkey invisibles (it’s in the top level key ‘globals’). Underneath is the colour code for this key. Adjust the alpha value to change it’s opacity.
  4. Hit save and your changes should reflect instantly!

Note that in my previous post I was referring to old fashioned tmTheme colour schemes, where colours are represented in XML/HTML style. Monokai is in the new sublime colour scheme syntax so the format is slightly different. Same principle though.

:slight_smile:

1 Like

#7

For what it’s worth you can perform these steps easier (and without external tools) by selecting View Package File from the command palette, entering monokai to filter the list and find the appropriate file, then Save As to your User folder.

2 Likes

#8

Nice tip matey. I had no idea this little feature had crept into Sublime… Should read changelogs more carefully I guess :rolling_eyes:

You learn something new every day :wink:

0 Likes

#9

Haha, it seems like forever since that was added in a dev build; we’ve finally reached a point where we can talk about it without also adding “if you’re using a dev build”. :wink:

I should also mention (since I just realized it now) that the first time you do this for a package file that’s packed, the view is read-only to remind you that you can’t edit it. When you save as the file to disk, it remains read-only in the buffer until you close it and reopen it, which is a bit more of a pain (and seems like a good candidate for a new feature).

Package resources opened from an unpacked file are editable as normal, however.

0 Likes

#10

Yes, I tend to play with dev builds as portables off and on, but stick with betas/releases for work in anger unless I really need a feature. In recent months I’ve been so busy doing “real work” that I’ve foregone time to noodle around with dev builds, so I’ve skipped a few. Hence my having been a bit quiet on the forums lately - though actively lurking :wink:

I just spotted that too, Save As should change the buffer state to rw. I daresay that could be considered a bug.

0 Likes

#11

Will that not change the opacity for ALL whitespaces, and not just the ones within commented code?

0 Likes

#12

Yes it will. I’m not sure if there’s a way to have scope-specific invisibles colour setting, but I’m almost certain there was no way before so - unless I’m wrong - you’re in the same place as previous builds in this respect.

1 Like

#13

there’s really no need to have a copy of the entire color scheme in your User package, see http://www.sublimetext.com/docs/3/color_schemes.html#customization

2 Likes

#14

I am almost positive there was scope-specific white space setting prior to this latest update, but I have been unable to figure out how to do it in the latest build. This is after following the instructions in this thread. I am hoping someone has an answer as I enjoy using the visible white space, but it makes comments basically unreadable at this point. I took a screenshot of some code before and after the update to show the differences. The before is on top and the after is on the bottom.

1 Like

#15

This thread here has a fair bit of info about white space, tabs, spaces, etc.

0 Likes