powered by change-case
- Select text - Highlight the text you want to transform in your editor
- Right-click on the selected text to open the context menu
- Choose "String Case Utils" from the context menu
- Select the desired transformation from the submenu (e.g., camelCase, kebab-case, CONSTANT_CASE, etc.)
- Select text - Highlight the text you want to transform
- Open Command Palette - Press
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(Mac) - Type "String Case Utils" to filter the available commands
- Select the desired transformation from the list
This extension automatically formats template strings (tagged template literals) when you save files. This feature is particularly useful for formatting embedded code within JavaScript/TypeScript files.
- Enable the feature - Set
stringCaseUtils.formatTemplateStringsOnSave
totrue
(enabled by default) - Configure tag functions - The extension recognizes specific tag function names like
markdown
,html
,css
, andjson
- Auto-format on save - When you save a file, template strings with recognized tags are automatically formatted
const html = String.raw
// Before formatting
const doc = html`<div><p>Hello World</p></div>`;
// After formatting (on save)
const doc = html`
<div>
<p>Hello World</p>
</div>
`;
markdown
- Formats Markdown contenthtml
- Formats HTML contentcss
- Formats CSS contentjson
- Formats JSON content
You can customize which tag function names trigger formatting by modifying the stringCaseUtils.formatTagFunctionNames
setting.
- Hash Generation - Generate MD5 hashes in 16, 32, or 64 character lengths for selected text
- Random Hash - Generate random hashes without requiring text selection
- Data Desensitization - Replace characters with asterisks (*) or custom characters for privacy
Key | Description | Type | Default |
---|---|---|---|
stringCaseUtils.showDesensitizeOption |
%configuration.showDesensitizeOption% | boolean |
true |
stringCaseUtils.desensitizeChar |
%configuration.desensitizeChar% | string |
"*" |
stringCaseUtils.showHashOptions |
%configuration.showHashOptions% | boolean |
true |
stringCaseUtils.formatTemplateStringsOnSave |
%configuration.formatTemplateStringsOnSave% | boolean |
true |
stringCaseUtils.formatTagFunctionNames |
%configuration.formatTagFunctionNames% | array |
["markdown","html","css","json"] |
Command | Title |
---|---|
stringCaseUtils.pascalCase |
String Case Utils: %command.pascalCase% |
stringCaseUtils.camelCase |
String Case Utils: %command.camelCase% |
stringCaseUtils.kebabCase |
String Case Utils: %command.kebabCase% |
stringCaseUtils.snakeCase |
String Case Utils: %command.snakeCase% |
stringCaseUtils.pascalSnakeCase |
String Case Utils: %command.pascalSnakeCase% |
stringCaseUtils.trainCase |
String Case Utils: %command.trainCase% |
stringCaseUtils.constantCase |
String Case Utils: %command.constantCase% |
stringCaseUtils.upperCase |
String Case Utils: %command.upperCase% |
stringCaseUtils.lowerCase |
String Case Utils: %command.lowerCase% |
stringCaseUtils.capitalCase |
String Case Utils: %command.capitalCase% |
stringCaseUtils.sentenceCase |
String Case Utils: %command.sentenceCase% |
stringCaseUtils.dotCase |
String Case Utils: %command.dotCase% |
stringCaseUtils.pathCase |
String Case Utils: %command.pathCase% |
stringCaseUtils.noCase |
String Case Utils: %command.noCase% |
stringCaseUtils.desensitize |
String Case Utils: %command.desensitize% |
stringCaseUtils.random_hash16 |
String Case Utils: %command.random_hash16% |
stringCaseUtils.random_hash32 |
String Case Utils: %command.random_hash32% |
stringCaseUtils.random_hash64 |
String Case Utils: %command.random_hash64% |
stringCaseUtils.hash16 |
String Case Utils: %command.hash16% |
stringCaseUtils.hash32 |
String Case Utils: %command.hash32% |
stringCaseUtils.hash64 |
String Case Utils: %command.hash64% |