Has as yes,
Via PL/SQL accessing Meno Tools > Preferences, in the group User Interface there is the option PL/SQL Beautifier.
Configuring the Rules File, click on Edit..:
So automatically this modification that you want is done through the option in the taskbar:
You can also enter a shortcut, Tools > Preferences > in the User Interface group there is the Key Configuration option, and assign a shortcut to the command.
Another option, you can load an Roles File, for example:
Copy the code below and save with the extension .br
Version=1
RightMargin=90
Indent=3
UseTabCharacter=FALSE
TabCharacterSize=3
AlignDeclarationGroups=TRUE
AlignAssignmentGroups=TRUE
KeywordCase=1
IdentifierCase=0
UseSpecialCase=TRUE
ItemList.Format=2
ItemList.Align=TRUE
ItemList.CommaAfter=TRUE
ItemList.AtLeftMargin=FALSE
EmptyLines=2
ThenOnNewLine=FALSE
LoopOnNewLine=FALSE
DML.LeftAlignKeywords=FALSE
DML.LeftAlignItems=FALSE
DML.OnOneLineIfPossible=TRUE
DML.WhereSplitAndOr=TRUE
DML.WhereAndOrAfterExpression=FALSE
DML.WhereAndOrUnderWhere=TRUE
DML.InsertItemList.Format=2
DML.InsertItemList.Align=FALSE
DML.InsertItemList.CommaAfter=TRUE
DML.InsertItemList.AtLeftMargin=FALSE
DML.SelectItemList.Format=2
DML.SelectItemList.Align=TRUE
DML.SelectItemList.CommaAfter=TRUE
DML.SelectItemList.AtLeftMargin=FALSE
DML.UpdateItemList.Format=2
DML.UpdateItemList.Align=TRUE
DML.UpdateItemList.CommaAfter=TRUE
DML.UpdateItemList.AtLeftMargin=FALSE
ParameterDeclarationList.Format=2
ParameterDeclarationList.Align=TRUE
ParameterDeclarationList.CommaAfter=TRUE
ParameterDeclarationList.AtLeftMargin=FALSE
RecordFieldList.Format=1
RecordFieldList.Align=TRUE
RecordFieldList.CommaAfter=TRUE
RecordFieldList.AtLeftMargin=FALSE
SplitAndOr=FALSE
AndOrAfterExpression=FALSE
Example File Roles Source: https://community.oracle.com/thread/899336?tstart=0
Configuration source:
https://lalitkumarb.com/tag/oracle-plsql-developer-settings/
That’s all I could do. Copy the script and play in Notepad++, give a Crtl+Shift+U and then copy and paste in PL/SQL. My colleague said that there is no way to do this in PL/SQL.
– pnet