I would like to highlight some text in a SQL Developer worksheet and convert it to uppercase with some keyboard shortcut.
Is there any such shortcut in Oracle SQL Developer?
I am using version 4.1.2.
Under Tools->Preferences->Shortcut Keys you can find and/or define the shortcut key combination for the Convert Selection to Uppercase and Convert Selection to Lowercase commands. I have mine mapped to CTRL+U and CTRL+L respectively. There unfortunately does not appear to be a specific command for converting text to Initcap, so the To Upper/Lower/Initcap command is the way to go for that. However, be aware that the To Upper/Lower/Initcap command actually cycles between five format modes:
Some of these modes will change the behavior of the code formatter (default key sequence CTRL+F7), and the Tools->Preferences->Code Editor->Completion Insight->Change case as you type setting if you have it enabled.
Found it! You can select text in your worksheet, then use Ctrl+Shift+" to switch between cases (in version 4.1.2).
It will cycle between the following cases:
Upper Case:
SELECT * FROM MYSCHEMA.EXAMPLE;
Lower Case:
select * from myschema.example;
Upper Keywords:
SELECT * FROM myschema.example;
Lower Keywords, Upper Identifiers:
select * from MYSCHEMA.EXAMPLE;
Upper Keywords, Lower Identifiers:
SELECT * FROM myschema.example;
Initial Cap:
Select * From Myschema.Example;
As mentioned by @PiotrSiekierski, you can change the keyboard shortcuts in Tools -> Preferences -> Shortcut Keys. In version 4.1.2, the Ctrl+' shortcut is mapped to 'Navigate Down' by default.
As mentioned by @Sentinel, if you are not interested in cycling through the different case options, you can assign a shortcut to 'Convert Selection to Uppercase' or 'Convert Selection to Lowercase' by going to Tools -> Preferences -> Shorcut Keys and searching for the desired functionality. You can then assign a shortcut to those commands, such as Ctrl+U or Ctrl+L. In version 4.1.2, the 'Convert Selection to Uppercase' and 'Convert Selection to Lowercase' commands have no shortcut mapping by default.