ThatJeffSmith

How to Make Your Code Look Like Steven Feuerstein’s in Oracle SQL Developer

As of last week, Steven came back to work with Oracle, on the database tools team. I first started working with Steven at another company, doing database tools stuff, and now we’re back together again!

Ok, that’s a little dramatic sounding.

I used to work with Steven, and now I do again :)

I think this will lead to our tools becoming even stronger and to our users becoming even more productive.

This morning, I spent a few minutes helping Steven customize SQL Developer to make it do what it needed for him to be OK with how the code is generated, displayed, formatted, etc.

Something I find Steven to be extremely good at is identifying code aesthetics. You look at code all day. You probably dream about it, yes? So making the code as easy to read as possible is worth quite a penny or 2.

So I asked Steven…

What fonts are you using?

Lucida Console, 14pt!

Here’s what that looks like, this isn’t Steven’s code BTW:

"It is a variant of Lucida Sans Typewriter with smaller line spacing, and added WGL4 character set."

“It is a variant of Lucida Sans Typewriter with smaller line spacing, and added WGL4 character set.”

And Steven had a few more questions?

How can I get SQL Developer to force line breaks at character position 70?

That’s a formatting option. So if you ask SQL Developer to format your code, you can tell it at what character position to end a line at.

line_breaks2

Note, the right margin line is NOT tied to the formatter. It’s just a hard-drawn line in the editor.

See where your code will eventually be aligned with the visible right margin

See where your code will eventually be aligned with the visible right margin

This preference is located at Tools > Preferences > Code Editor > Display > Show Visible Right Margin

Note, this was missing in v4.0, but was added back (fixed) in v4.0.1.

How can I get SQL Developer treat my words the way I want, lowercase, uppercase, etc?

Formatting-wise, that’s here:

Keywords Uppercase it is!

Keywords Uppercase it is!

Steven also had some questions about indenting his PL/SQL code, and I’m still looking at that. But I will note that that is currently controlled in the Formatting Preferences and the Indentation sub page.

So if you see Steven around, be sure to congratulate him on re-joining the Home Team!