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
- The code is wider that the right margin I have set
- 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?
2 Answers 2
I did a google search for the phrase "sql developer code formatting", and the first hit was this:
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– Ed Heal2015年07月14日 16:48:06 +00:00Commented 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.Mat– Mat2015年07月15日 10:20:19 +00:00Commented Jul 15, 2015 at 10:20
Has actually moved in v17.4
Can be found in: Oracle SQL Developer -> Preferences... -> Code Editor -> Format
and Optionally -> Advanced Format -> Custom Format