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?

6

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

  • 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. – Ed Heal Jul 14 '15 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. – Mat Jul 15 '15 at 10:20
2

Has actually moved in v17.4

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

and Optionally -> Advanced Format -> Custom Format

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.