English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Deutsch · Français · Español · Português (Brasil) · Italiano · Русский · Polski · Türkçe · Čeština · Magyar
A powerful variable naming and path style conversion extension for VS Code
Marketplace · OpenVSX · GitHub · Gitee
Supports one-key conversion and cyclic conversion, and can be used through the context menu, keyboard shortcuts, the status bar, and more.
- ✅ Multi-selection support
- ✅ Multiple editor windows support
- ✅ Undo & redo support (Ctrl + Z / Ctrl + Y)
- ✅ Enable only the target conversion formats you need
Select what you want to convert in the editor, then press Ctrl + Alt + [ or Ctrl + Alt + ] to cycle through the available naming conventions.
1. Select the text to convert
2. Press Shift + Alt + T
Or click the Variable Conversion button in the status bar.
Or right-click → Variable Conversion.
Or right-click on the selected text → Convert string to....
3. Select the conversion target — and you're done.
This feature is still in Beta. If you encounter any problems, please let us know via the contact information at the end of this document.
Path conversion works the same way as variable conversion — through the context menu, the status bar, or keyboard shortcuts. The only difference is the shortcuts:
- Next path style:
Ctrl + Alt + / - Previous path style:
Ctrl + Alt + Shift + /
Note: Only Windows-style and Unix-style paths are supported for now, so both shortcuts currently do the same thing. More path styles are planned (e.g. Windows Git Bash style, browser file:// protocol).
| Feature | Shortcut |
|---|---|
| Variable conversion QuickPick | Shift + Alt + T |
| Variable cyclic conversion → previous | Ctrl + Alt + [ |
| Variable cyclic conversion → next | Ctrl + Alt + ] |
| Show format order info dialog | Ctrl + Alt + ` |
| Path conversion QuickPick | Shift + Alt + / |
| Path cyclic conversion → previous | Ctrl + Alt + / |
| Path cyclic conversion → next | Ctrl + Shift + Alt + / |
If these shortcuts don't suit you, you can customize them in VS Code via the gear icon ⚙ in the lower-left corner → Keyboard Shortcuts.
| Configuration Key | Description | Example | Default |
|---|---|---|---|
variable-conversion.enabledFormats |
Enable or disable variable naming conventions. | { "xxxCase.enabled": boolean, ... } |
See settings |
variable-conversion.formatOrder |
Configure the display order of variable naming conventions. | [ "camel_case", "pascal_case", "snake_case" ] |
See settings |
variable-conversion.enabledPathFormats |
Enable or disable path formats. | { "windowsStyle.enabled": boolean, "unixStyle.enabled": boolean } |
See settings |
Settings overview:
| Enabled Formats | Format Order |
![]() |
![]() |
| Enabled Path Formats | |
![]() |
|
| Case | Example |
|---|---|
| Camel Case | fooBar |
| Pascal Case | FooBar |
| Snake Case | foo_bar |
| Snake Camel Case | foo_Bar |
| Snake Pascal Case | Foo_Bar |
| Snake Upper Case | FOO_BAR |
| Kebab Case / Spinal Case | foo-bar |
| Kebab Camel Case | foo-Bar |
| Kebab Pascal Case | Foo-Bar |
| Kebab Upper Case | FOO-BAR |
| Space Case | foo bar |
| Space Camel Case | foo Bar |
| Space Pascal Case | Foo Bar |
| Space Upper Case | FOO BAR |
| Dot Case | foo.bar |
| Dot Camel Case | foo.Bar |
| Dot Pascal Case | Foo.Bar |
| Dot Upper Case | FOO.BAR |
| Lower Case | foo_bar / foobar |
| Upper Case | FOO_BAR / FOOBAR |
Supported path styles:
| Style | Example |
|---|---|
| Windows Style | C:\Windows\System32 .\public\assets\ |
| Unix Style | /usr/bin./public/assets/ |
Planned path styles:
| Style | Example |
|---|---|
| Windows Style (Backslash Escaped) | C:\\Windows\\System32 |
| Unix Style (Backslash Escaped) | \/usr\/bin |
| Windows Git Bash Style | /c/Windows/System32 |
Browser file:// protocol |
file:///C:/Program%20Files%20(x86)/ |
- Hold
Alt, then select multiple regions with the mouse. - Hold
Shift + Alt, press the left mouse button, and drag over the block you want to select. - Press
Ctrl + Dto select the word under the cursor.
If you have suggestions for improving this extension, or find a bug, please open an issue on GitHub. Feedback in English or Chinese is welcome. Please avoid machine translation so descriptions stay clear.
This extension is open source under the MIT License. Pull requests are welcome to make it even better!
GitHub Repo: https://github.com/zhang-brook/variable-conversion-vscode-extension.git
Gitee Mirror: https://gitee.com/zhang-brook/variable-conversion-vscode-extension.git
Enjoy!










