30 SQL Developer Tips in 30 Days, Day 3: Syntax Highlighting

thatjeffsmith SQL Developer 29 Comments

Tell Others About This Story:

Someone asked the other day, ‘how can I make tables show up in blue?’

How SQL Developer colors all of the text in your editor is defined in the preferences.

How SQL Developer colors all of the text in your editor is defined in the preferences.

In the preferences, find the ‘PLSQL Identifier’ entry in the PL/SQL Syntax Colors entry, and set it to whatever color you’d like.

Another example…

Grammar Squiggles, They’re Hard to See Sometimes

This time, look for the ‘Disconnected Join Graph’ entry.

Change the type of line, color, etc.

Change the type of line, color, etc.

One more…

Classic Green Screen

The very first entry, ‘Default Plain text’ – set that to background, ‘black,’ and then set everything else to your liking.

The 80's refuse to die.

The 80’s refuse to die.

If you go ‘dark’, you’ll want to change the color of your cursor as well.

Preferences > Code Editor > Caret Behavior > Caret Color. Thanks for the commenters below who helped remind me and others 🙂

Tell Others About This Story:

Comments 29

  1. Dear all,

    I have installed the latest version of the SQL Developer. Upon setting up the preferences I ran into a problem with the syntax highlighting of comments. If I choose to set a color to highlight the background of any comment then every blank space (and tab space) is highlighted in the same color (even if it is not in a comment).
    Is this a normal behaviour or some bug?

    Thanks.

    1. thatjeffsmith Post
      Author
  2. Hi Jeff, one question in sql developer Version 4.0.3.16; once i double click a word or anything ; it highlights the selected word found anywhere in the worksheet with a pink colour but when i select a different word ; i expect the previous selection to go away and only the newly selected words to be highlighted (Same as in notepad ++) but it keeps on highlighting the previously selected as well ; creating sort of confusion. Is there a trick to make it highlight only recent selection..

    1. thatjeffsmith Post
      Author
      1. I just upgraded to 4.0.2..
        I wish there was auto update from application without need to download the new version completely

        1. thatjeffsmith Post
          Author
  3. I see the “SAVE AS” button, to save the style settings. I’m about to change computers, is information stored in a file? How can I backup the style settings and import to a new computer?

    Thanks …

    1. thatjeffsmith Post
      Author
  4. Very helpful post, thanks Jeff. Unfortunately, I don’t even have the ‘Available Styles’ – entry of ‘Default Plain text’ . Anyway to enable that ?

    I am using Version 3.1.07, Build MAIN-07.42

    1. thatjeffsmith Post
      Author
  5. Hi, I know this is a very old post. Still I would put the my question here.
    in sqldeveloper, while creating a table, when I try to use words like ID, NAME, SOURCE, etc… as column names of a table, the color of this words turn to blue. Why is it so? I know these are not oracle reserved keywords.

    another question would be : how can I prevent this behavior? what If I want only oracle reserved keywords turned blue in sqldeveloper?

    1. thatjeffsmith Post
      Author
  6. Nice! That definitely worked. Finding this folder helped me understand what was happening. I had tried to install 4.02 at some point but didn’t use it because it required a newer version of Java. So when I installed 4.03 it was copying settings from that 4.02 version, which I never set up. So I deleted the 4.02 and 4.03 files, ran the app new again, and it copied from 4.01 (which is what I was actually using).

    Thanks for the tip, this worked great!

  7. Can I get the corresponding directory on a mac? In the searching I’ve done, there are some folders at /Users/dan.murphy/.sqldeveloper/ – would I need to find the correct 4.03 version folder to delete from this directory?

    I tried deleting the app and reinstalling before asking initially, but I’m guessing I need to find this folder you are talking about and delete it before reinstalling (hopefully)?

    Thanks again.

    1. thatjeffsmith Post
      Author
  8. I just upgraded to 4.0.3.16 (had to upgrade java from 7u25 as well). It asked me if I wanted migrate my settings as it always does when upgrading to a new version. Except this time it didn’t bring anything over. I can update my connections easily enough, but not all of my settings that I’ve tediously tweaked over the years (such as syntax highlighting). Any suggestions? Thanks!

    1. thatjeffsmith Post
      Author

      Easiest thing to try – delete the system folder under Windows/User/Application Data/Roaming Profiles – the SQL Developer system directory will have the version number in its name correlating to the 403 version. Delete that. Then try running the EXE again and see if it brings it over successfully.

      If it doesn’t try manually copying the files under your older install into that folder.

  9. Hi Jeff,
    I appreciate that in version 4 it is finally possible to change the color scheme to a use dark one, but there are still some glitches here and there.

    For example, after having changed the background to black as in your example, try to open the Monitor Sessions window from the Tools menu, then click on an active session and behold the colors in the Active SQL pane below…

    You will see the SQL text on black background surrounded by white background. Not very nice to look at, IMHO…

    Paolo

  10. Hi Jeff

    Along the same lines, but different:

    Is there a way to copy/paste your SQL code into a text editor or email and retain the formatting? I have seen this with other products. Thanks

    1. thatjeffsmith Post
      Author
  11. I really like dark themes.
    I failed to use it with SQL Developer (tried manually and tried the “Twilight”) because my cursor disappeared. Couldn’t find how to change the cursor color.

    1. thatjeffsmith Post
      Author
    2. I had the same problem with the “Twilight” theme becuase the cursor colour defaults to the same colour as the background – so you can’t see it . I discovered you can change the Cursor (=Caret) colour under Preferences->Code Editor->Caret Behavior.

Leave a Reply

Your email address will not be published. Required fields are marked *