How do you capitalize words in Visual Studio code?

In Visual Studio we are all used to being able to use CTRL+SHIFT+U to transform the selected text to uppercase but for Visual Studio Code this key binding was left out. As long as you are using Version 1.8.1 or above you will be able to take advantage of the built in keyboard shortcuts. Do the following to enable the keybindings.

Note: Ubuntu users will need to use a modified binding; change to ctrl+alt+u and ctrl+alt+l.

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"
     }
    ]

Ubuntu users:

    [
     {
        "key": "ctrl+alt+u",
        "command": "editor.action.transformToUppercase",
        "when": "editorTextFocus"
     },
     {
        "key": "ctrl+alt+l",
        "command": "editor.action.transformToLowercase",
        "when": "editorTextFocus"
     }
    ]

As soon as you save you will now be able to use CTRL+SHIFT+U to change selected text to uppercase and CTRL+SHIFT+L to change selected text to lowercase.

Since you've made it this far, sharing this article on your favorite social media network would be highly appreciated 💖!

As developers, we want to develop things fast. If you use Visual Studio Code (VS Code), you should know about extensions.

Extensions are a very big part of turning an ordinary text editor into a super productive environment for coding. There so many extensions available on VS Code, and it’s easy to build one if you have a part of your development workflow you want to optimize or automate.

There will be times when you may want to convert the case of a string or sentence; doing it manually always seems like it won’t take long, but when you accumulate the time you spend on that, it results in tens of minutes. In order to move faster, it’s good to identify different parts of our development workflow that need automation or optimization.

A simple VS Code extension called change-case helps with automating the process of case conversion. Install this extension and save yourself a few more minutes.

To use this extension, highlight the string or sentence and open the VS Code command palette by pressing:

Command + Shift + P

Use Ctrl + Shift P for Windows and Linux.

The command palette will display a list of commands you can run. Type ‘changecase’ to filter for the change-case commands. You should see a list that looks like this:

As shown in the image above, you can convert a string or sentence’s case into:

  • Upper case
  • Lower case
  • Camel case
  • Snake case
  • Upper case first letter
  • Lower case first letter
  • Sentence case
  • Kebab case
  • Etc.

With this, you’ll save yourself from wasting time doing case conversion. Remember, automate more manual processes to improve your development speed.

CONTRIBUTOR

Emmanuel Awotunde

How do you capitalize all letters in Visual Studio?

Select the text you want to convert. To convert text to all upper case, choose Edit > Advanced > Make Uppercase or press Ctrl+Shift+U.

What is the hotkey for capitalization?

To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and press SHIFT + F3 until the case you want is applied.

How do you capitalize the first letter in Visual Studio?

Usages.
use shortcut Shift+Alt+U..
or press Ctrl+Shift+P and choose First Uppercase..