Can I make a multi-line selection of text all capitals in Visual Studio Code?
In full Visual Studio it\'s CTRL+SHIFT+U
To upper case: Ctrl+K, Ctrl+U
and to lower case: Ctrl+K, Ctrl+L.
Mnemonics:
K like the Keyboard
U like the Upper case
L like the Lower case
I think you can use Step 1: Select text Step 2: Ctrl + Shift + P Step 3: Enter Uppercae
Select the text you want capitalized
Open View->Command Palette (or Shift+Command+P)
Start typing "Transform to uppercase" and select that option
Voila!
It is the same as in eclipse:
Ctrl + Shift + X
Ctrl + Shift + Y
In Linux and Mac there are not default shortcuts, so try to set your custom shortcut and be careful about don't choose a hotkey used (For example, CTRL+U is taken for uncomment)
In my case I have CTRL+U CTRL+U for transform to uppercase and CTRL+L CTRL+L for transform to lowercase
Just in case, for Mac instead of CTRL I used ⌘
The question is about how to make CTRL+SHIFT+U work in Visual Studio Code. Here is how to do it. (Version 1.8.1 or above).
File-> Preferences -> Keyboard Shortcuts.
An editor will appear with keybindings.json file. Place the following JSON in there and save.
[
{
"key": "ctrl+shift+u",
"command": "editor.action.transformToUppercase",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+l",
"command": "editor.action.transformToLowercase",
"when": "editorTextFocus"
}
]
Now CTRL+SHIFT+U will capitalise selected text, even if multi line. In the same way, CTRL+SHIFT+L will make selected text lowercase.
These commands are built into VS Code, and no extensions are required to make them work.