Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I create a VS Code keyboard shortcut to change a camel-case string to sentence-case?

In VScode I need one shortcut which can split one single string (camel-case) into words with space(s).
e.g.

getCheckoutCartHelper

desired output:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Get checkout cart helper

Tried to create shortcut in key-binding but nothing.

>Solution :

There is a VS Code extension called "change-case". Install this extension. In VS Code, open the Shortcut settings with "Shift + Ctrl + P" and type in "Preferences: Open Keyboard Shortcuts". There you can search the command "extension.changeCase.sentence" and bind it to a shortcut.

Regards

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading