9

I have just cut 'n' paste some SQL code into SQL developer (4.0.2.15). I have a right margin set and selected CTRL+F7 to format it. However I have two problems

  1. The code is wider that the right margin I have set
  2. The keywords are in capitals and the coding standard here is lowercase.

I have been unable to find how to change this or is this possible?

asked Jul 14, 2015 at 13:58

2 Answers 2

7

I did a google search for the phrase "sql developer code formatting", and the first hit was this:

http://www.thatjeffsmith.com/archive/2014/03/how-to-make-your-code-look-like-steven-feuersteins-in-oracle-sql-developer/

Have a read through that blog post from Jeff Smith, product manager for SQL Developer. That should explain what you need to do.

Edited to add picture of the relevant options.
pic of tree showing relevant options

answered Jul 14, 2015 at 15:32
2
  • I read that page. The options for me is to import/export the settings as an XML file - Not the dialog as displayed. I must be using an older version. Commented Jul 14, 2015 at 16:48
  • @EdHeal: looks like you're not on the right "branch" in the preferences menu. The import/export options are on the "Database/SQL Formatter" node, you need to go one deeper "Database/SQL Formatter/Oracle Formatting", then click "edit" next to the profile dropdown on that screen. This works on 4.0.2. Commented Jul 15, 2015 at 10:20
3

Has actually moved in v17.4

Can be found in: Oracle SQL Developer -> Preferences... -> Code Editor -> Format

and Optionally -> Advanced Format -> Custom Format

answered May 11, 2018 at 20:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.