Jun 12, '09 07:30:00AM • Contributed by: CkB_Cowboy
While I find BBEdit to be a fantastic text editor, there are a few minor things I've always wanted to change, one of which is the color for Invisibles. I love the idea, but against my preferred background color, they stand out far too much to be anything but distracting.
If you've never seen Invisibles, you can enable them for the current document in the Text Options menu of that window's toolbar, or globally by going to Preferences » Editor Defaults » Show Invisibles.
Now, if at first glance they seem obnoxious, imagine their color changed to be a bit more subtle, like just slightly darker or lighter than the background color. Sound better? Read on!
First of all, I recommend that you back up the ~/Library » Preferences » com.barebones.bbedit.plist prefs file, just in case. Then open a new Terminal window and paste this line in (and leave the window open afterwards):
export BBEDIT_COLOR=$(defaults read com.barebones.bbedit Color:Comment)
In BBEdit, go to Preferences Text Colors, and change the color for Comment to the color you'd like for Invisibles (feel free to actually throw some code and comments into a page to test with), then quit BBEdit.
In the same shell as before. run these commands:
$ defaults write com.barebones.bbedit Color:Invisibles:Other -string "$(defaults read com.barebones.bbedit Color:Comment)"
$ defaults write com.barebones.bbedit Color:Comment -string "$BBEDIT_COLOR"
- If "Reopen documents that were open at last quit" is enabled, when BBEdit opens, the first document apparently uses the default Invisibles colors (even if they are changed in BBEdit's DefaultPreferences.plist file). I have found no way around this annoyance, short of always opening an empty placeholder text file as the first open file in that window.
- Color:Invisibles:Other doesn't actually seem to change anything, not that I've noticed at least.. but I'm setting it anyways, just in case.
[robg adds: I haven't tested this one.]
