Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

community creator

How to easily convert string case in VS code with extension

Emmanuel Awotunde

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:

case-converter commands VS Code

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.


community creator

View all Courses

Keep Exploring