Skip to content

hjdarnel/vscode-change-case

 
 

Repository files navigation

Change Case Extension for Visual Studio Code

VSCode Marketplace version OVSC version All Contributors

This is a fork of wmaurer/vscode-change-case, which I intend to keep up with, track issues, and update regularly.

A wrapper around node-change-case for Visual Studio Code. Quickly change the case of the current selection or current word.

If only one word is selected, the extension.changeCase.commands command gives you a preview of each option:

change-case-preview

change-case also works with multiple cursors:

change-case-multi

Note: Please read the documentation on how to use multiple cursors in Visual Studio Code.

Also, with extension.changeCase.renameFile it is possible to change casing of active files.

Install

Launch VS Code Quick Open (Ctrl/Cmd+P), paste the following command, and press enter.

ext install change-case

Commands

Command Output Explanation
extension.changeCase.commands Hello world List all commands, with preview if only one word is selected
extension.changeCase.camel helloWorld A string with the separators denoted by having the next letter capitalized
extension.changeCase.constant HELLO_WORLD An upper case, underscore separated string
extension.changeCase.dot hello.world A lower case, period separated string
extension.changeCase.kebab hello-world A lower case, dash separated string (alias for param case)
extension.changeCase.lower hello world A string in lower case
extension.changeCase.lowerFirst hello world A string with the first character lower cased
extension.changeCase.no hello world Convert the string without any casing (lower case, space separated)
extension.changeCase.param hello-world A lower case, dash separated string
extension.changeCase.pascal HelloWorld A string denoted in the same fashion as camelCase, but with the first letter also capitalized
extension.changeCase.path hello/world A lower case, slash separated string
extension.changeCase.sentence Hello world A lower case, space separated string
extension.changeCase.snake Hello_World A lower case, underscore separated string
extension.changeCase.snakeUpper Hello_World A underscore separated string with the first character of every word upper cased
extension.changeCase.swap hELLO WORLD A string with every character case reversed
extension.changeCase.title Hello World A space separated string with the first character of every word upper cased
extension.changeCase.upper HELLO WORLD A string in upper case
extension.changeCase.upperFirst Hello world A string with the first character upper cased
extension.changeCase.sponge hELLo WOrLd A to a string with random capitalization applied

Support

Create an issue

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Henry Darnell

💻 📖

Vitaly

💻

druesendieb

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!