This vscode extension was created as a an utility extension to easily replace your current snippet (example variable name, function name) with a different style equivalent, without having to manually to do it, for example:
convert this function name to camelCase:
get_value_from_data_base
to:
getValueFromDataBase
Other styles are also supported please check which ones bellow.
This vscode extension allows to stylelize snippets (single selection, multiline selection or multiple selections), with you prefered style, the covered styles are:
- camelCase
- PascalCase
- Pascal Case With Spaces
- snake_case
- UPPERCASE
To use this extension you need to have an editor open and text selected, then you can either use keybinds or the Run Commands bar:
Keybind | Style |
---|---|
ctrl+alt+c | camelCase |
ctrl+alt+p | PascalCase |
ctrl+alt+i | Pascal Case With Spaces |
ctrl+alt+s | snake_case |
ctrl+alt+u | UPPERCASE |
Unix/Windows : ctrl+shift+p Unix/Windows : cmd+shift+p
Command | Style |
---|---|
Stylize Camel Case | camelCase |
Stylize Pascal Case | PascalCase |
Stylize Pascal Case With Spaces | Pascal Case With Spaces |
Stylize Snake Case | snake_case |
Stylize Upper Case | UPPERCASE |
NOTE: This extension uses a simple regex form to detect the words selected in the editor this function won't properly work if you use non ASCII characters or you use full caps word without any other separator (as it will be detected as one single word).
Initial release of snippet-stylizer First publish of snippet-stylizer extension