Ted’s Rants and Raves by Ted M. Young

February 27, 2008

This Saturday: InstallFest in San Mateo, CA

Filed under: Rave

The Silicon Valley Linux Users Group (SVLUG) is having another InstallFest in San Mateo, CA (2800 Campus Drive), this Saturday (March 1st) as part of the larger Bay Area InstallFest for Schools. Other areas include San Francisco, Berkeley, and Novato. The goal is to donate 500 computers, with Ubuntu pre-installed, to Bay Area schools. Here’s more information: http://www.untangle.com/installfest.

Sounds like fun, especially with free pizza and schwag from the Mozzilla Foundation!

IntelliJ IDEA Tip: Change Background Color for Read-Only Files

Filed under: IntelliJ IDEA

When I’m editing a file, I like to know immediately whether I’ve checked it out for editing, or if it’s in read-only mode. Sure, you can look at the at the editor tab and see if there’s a little tiny lock icon File Lock Icon on the editor tab (when you’re running at 1920x1200 on a laptop screen, tiny is really tiny), or maybe the color of the tab text is black. However, I prefer a much more obvious way: making the background of the editor a color other than the standard white. Note: if you have colors set up such that the background isn’t white, you can still use this tip, just use a different color than in my example.

So, an editable file looks like this (white background):

Editable Background Color

And a read-only file looks like this (a slightly blue-tinted background):

Read-Only Background Color

I find that the slight color change is obvious enough to let me know I’m looking at a read-only file at first glance, yet subtle enough not to get in the way of reading the code.

Changing It

I recommend opening up a read-only file before adjusting the settings so that you can see how it looks while you’re adjusting the colors (see step 6 below).

1. Open up the IDE Settings (Ctrl+Alt+S for me) and select “Colors and Fonts”:

Settings: Colors and Fonts

2. If the General tab isn’t selected, click on it. Underneath you’ll see a list of items: select “Background in readonly files” (pointed to by the green arrow). Don’t confuse this entry with the “Readonly fragment background” (pointed to by the red arrow).

Changing Background Color For Read-Only Files

3. If the Background checkbox Background Color Checkbox isn’t selected, then select it.

Set Background Color

4. Right-click on one of the gray boxes on the right-side to customize the color. You’ll see this dialog show up:

Select Color

5. Adjust the color to something subtle: keep in mind that you want a very light (i.e., low saturation) color. The little swatch that you see in the color selector is misleading: you’ll think the color is light enough, but it’ll end up being darker than you expect when it’s the background color for the whole editor. I suggest using the RGB values above (R=247, G=255, B=255), but feel free to experiment. After you’ve “mixed” your color, click the OK button and you’ll now see your color as one of the “customized colors” on the right side of the pre-selected color palette:

Click the new color

6. After you click on your new color, you can hit the Apply button and, if the current file showing in the editor is read-only, you’ll immediately see the background color change. Click the OK button once you’re done and you’re all set!

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com