In Oracle SQL Developer, some queries are too long to show in one line, so I must use the scroll bar to see the hidden text on the right side.
How can I make Oracle SQL Developer to automatically wrap long query onto a new line?
There is no 'auto transform my code', but we do have the formatter.
The formatter has rules. There is a rule which will control the max length of a line of code.
Set the Max char line width preference in the formatter.
Then format your code (ctrl+F7)
It's not absolute, however.
Below is a screenshot of the setting set to 45, also with the visible line gutter set to also 45 (and red), with some formatted code.
Note I've also told the formatter NOT to insert carriage returns before or after commas in a SELECT or FROM.
We don't cut the text off, mid word...instead, we force a line break at the next whole word. What I suggest instead is investigate the preferences around line breaks in general - of which there are MANY.
As you tweak the preferences, you can see your sample code format in real time, so you know what the true effect is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With