Shortcut to Uppercase Selected Text in Oracle SQL Developer - oracle

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:
UPPERCASE
lowercase
Initcap
Lower Keywords, Upper Identifiers
Upper Keywords, Lower Identifiers
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.

in 4.2.0.17 highlight the word(s) then Alt + '

This is perhaps and old question, but I noticed that while on Mac, the keyboard shortcut for cycle is unbound.
I followed the above suggestions in
tools->preferences->shortcuts
and bound it myself to ctrl + ' but note that in 4.2 on Mac by default this is unbound.

This cycles through Upper/Lower/Initcap in my SQL Developer version 18.2.0.183 Build 183.1748.
ALT + '

Ctrl + ' changes case by default. You can find all shortcuts in:
tools->preferences->shortcuts

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.

This cycles through Upper/Lower/Initcap.
CTRL + '

Use
Control + '
Everytime you press it, it toggles between camel case, lower case, and upper case. I hope this helped you.
My SQL dev is 18.4. It worked for me

In newest versions you can highlight the text and then go to: Tools >> PL/SQL Beautifier and this will format your query and uppercase the text!
Hope it helps.

In sql server selected text Convert in to upper case and lower case use this shortcut key
Upper Case : ctr + shift + U
Lower Case : ctr + shift + L

Related

I don't understand the format selection (cmd + K cmd + F) shortcut keys in VS Code

Can someone please explain to me how the "format selection" (cmd + K cmd + F) shortcut keys - and other shortcuts that seemingly have multiple button press combinations - work in VS Code.
I tried pressing cmd + K and cmd + F simultaneously (though, cmd is listed twice so I am really pressing cmd + K + F in this case) and I have tried hitting them in order. If someone could explain what they mean here, then it would be much appreciated. I am sure it's a simple solution that I have been overlooking for all these years.
The written format for shortcut expressions use the operators '+' (plus) and ' ' (space) to define whether the expressions on each side of the operator should be pressed simultaneously, or sequentially.
'+' represents two keys pressed then held simultaneously, in left-to-right order.
This is the same as typing an uppercase letter using the shift key: Shift+a -> A
' ' represents concatenating the right-hand-side key combo after the left-hand-side combo.
This is the same as typing an uppercase word using the Shift key: Shift+h Shift+i -> HI
In the second example above, note that you can either keep holding Shift, or you can release it and press it again for each letter. The same applies with VSCode shortcuts.
In the case of Format Selection (Cmd+k Cmd+f), Cmd should be held while first k then f are pressed. Pressing k and f together is a different shortcut entirely (Cmd+k+f), as is pressing f and k together (Cmd+f+k). Since the left-hand-side key (Cmd) is the same for both expressions, you don't need to release it between typing the k and f.
To get a better grasp of how keyboard shortcuts are expressed, I'd suggest opening the the VSCode Preferences for Keyboard Shortcuts either using the command palette, or using the shortcut: Cmd+k Cmd+s: (type ks while holding Cmd).
Then activate the Record Keys mode (Alt+K). Now type different key sequences, and it will show you the textual representation in the search bar, along with any shortcuts that match what you typed.

How to change letter case in RStudio editor?

I just read Google's R Style Guide, and decide to be consist with the letter case in function names and variables. How to change letter case in RStudio's editor? To be specific, how to change words
to all lowercase
to all uppercase
to captilized case (capitalize the first letter)?
To Lower case you can use the keyboard shortcut Ctrl + Shift + U,
To Upper case you can use the keyboard shortcut Ctrl + U
According to Rstudio support:
There isn't one [i.e., a hotkey] right now. The functionality is available under the Vim keybindings, though--with the editor in Vim mode, pressing ~ will toggle the case of the character under the cursor (or of the current selection, etc.)
Further information on Vim mode is available at support.

How can I block select in Geany?

I often need to select a block of text, like a leading character that occurs on many lines. LibreOffice has block selection. How can I do this in Geany?
For example, I want to remove the pipe and the space at the beginning of each line:
| Create another 'Login Role' for the 'auth' user:
| Role name: auth
| Password: auth
| Role privileges: Create database objects
It's called "column mode editing". Look here:
http://www.geany.org/manual/current/index.html#column-mode-editing-rectangular-selections
Column mode editing (rectangular selections)
There is basic support for column mode editing. To use it, create a
rectangular selection by holding down the Control and Shift keys (or
Alt and Shift on Windows) while selecting some text. Once a
rectangular selection exists you can start editing the text within
this selection and the modifications will be done for every line in
the selection.
It is also possible to create a zero-column selection - this is useful
to insert text on multiple lines.
Peter Mortensen has documented how to configure this on Lubuntu (for LXQt):
https://pmortensen.eu/world2/2020/03/29/using-geany/#Column_mode_blues
On Lubuntu, the keyboard shortcuts for selecting a rectangular area of
text (“column mode” in UltraEdit) do not work, because they conflict
with four default keyboard shortcuts in the window manager (LXDE?
Openbox?), Shift + Alt + arrow up, Shift + Alt + arrow down,
Shift + Alt + arrow left, and Shift + Alt + arrow right.
Disable the window manager keyboard shortcuts by editing file
~/.config/openbox/lubuntu-rc.xml near “S-A-Up”, “S-A-Down”,
“S-A-Left”, and “S-A-Right”. For example, change “S-A-Up” to
“S-A-Up99”, “S-A-Down” to “S-A-Down99”, “S-A-Left” to “S-A-Left99”,
and “S-A-Right” to “S-A-Right99”, respectively. And add an XML comment
as to why and document the original values (so they can more easily be
reverted). Edit and update (without a restart required):
vi ~/.config/openbox/lubuntu-rc.xml
openbox --reconfigure
It was tested with Lubuntu 18.04 (32 bit).
In Debian the following works for me: press only the Ctrl key and select by the mouse (not both Ctrl and Shift keys, as described in the manual).
In Ubuntu MATE (Geany 1.25) I can use Shift + Alt and then mark the text using arrow keys.
I think, Ctrl + Shift + mouse(!). It's working correct on Ubuntu with Geany 1.23.1. Please use the mouse, not the arrow keys.
Ctrl + Shift + Mouse on CentOS 7.3.
For me the key shortcuts are different. After installing the Extra Selection Geany plugin, I can use:
Alt + Shift + C (and then use the up, down, etc. arrow keys to move the cursor; edit the text; and then repeat Alt + Shift + C to go back to 'normal' edit mode).
More information is here.
(I use VirtualBox with Xubuntu 16.04.4 LTS (Windows 10 host).)

VS2010 formatting hotkey?

Is there a hot key to force VS to format the current line/block in C#? (Similar to what happens when you add a semicolon to the end of a line or add a closing brace)
You can see the shortcuts (they are dependent on your settings) in the Edit/Advanced menu, where you have Format Document and Format Selection.
Place the cursor on one brace, then press Ctrl+Shift+{, then Ctrl+E, F.
You can also format the entire document by pressing Ctrl+E, D.
There are:
Ctrl + K + D - it formats the whole document.
Ctrl + K + f - it formats the current selection.
These also appear under the Edit -> Advanced menu.
See this document on MSDN, these appear under Edit.FormatDocument and Edit.FormatSelection.

How to navigate back to the last cursor position in Visual Studio?

What is the keyboard shortcut navigate back to the last cursor position in Visual Studio?
It Will not work for red color (-) key. For me it only works for blue color combination.
According to Visual C# 2008 Keybinding Reference Poster it is Ctrl + -. The name of the specific keybinding is View.NavigateBackward.
PS: While researching I also found that Ctrl + . is the same as Shift + Alt + F10. Nice!
ctrl + - (dash) navigates backward.
ctrl + shift + - (dash) navigates forward.
These settings can be found under Environment -> Keyboard:
For Changing the setting in Visual Studio 2019:
Search for view.navigate
CHOOSE "Text Editor" from the "Use new shortcut in:" drop down menu
Select your shortcut
Global doesn't catch for this.
For new VS Code(1.28.2)
Back: Ctrl+Alt+- (dash)
Forward: Ctrl+Shift+- (dash)
The most generic answers is: there is no working default and you need to define your own keyboard shortcuts for View.NavigateBackward and View.NavigateForward.
Why? For most keyboards, the default shortcut is a broken, unusuable combination because VS badly handles the shift and altGr modifiers. MS did not pay attention to portability and internationalisation so much when they redeveloped VS after version 6, and this is still true today. This bug has been there for way more than a decade, nearly two decades. At this rate, it will never be fixed. And yes, I have filled a bug report, and I'm certainly not the only one.
However, their "VSCode" product line does have better keyboard handling as it doesn't depend on the shift or altGr modifiers to identify the key. For example, when you are in text writing mode and press the key that has the dash symbol, without using shift nor altGr, let's say it writes something else, like number 6. To VSCode when it comes to shortcut handling, that's still the dash key for its purpose. As long as a key has the symbol written on it, whether this is painted as the 1st, 2nd or 3rd level doesn't matter, it just that key.
Of course, it's never a good thing to make the default shortcuts use non-alphanumeric symbols, that's always confusing, whether it works or not. The good mature text editors have known that for a long time and should be taken as examples of things done right. In some ways, VS learned a few good things from emacs with shortcuts that are a sequence of two letters, but ultimately screwed up on other parts with the choice of non-alphanumeric bindings, combined with a broken low-level keyboard handling.
This works for me in Visual Code
Navigate backward Alt+←
Navigate forward Alt+→

Resources