diff --git a/CHANGELOG.md b/CHANGELOG.md index dcc78fb..5755106 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Add shortcut key `Ctrl + Shift + T` to show vscode QickPick window (添加快捷键 Ctrl + Shift + T 来显示 vscode QickPick 弹窗) +- Add shortcut key `Shift + Alt + T` to show vscode QickPick window (添加快捷键 Shift + Alt + T 来显示 vscode QickPick 弹窗) - Write `README.md` (完善 README 文档) ## 1.0.3 diff --git a/README.md b/README.md index 2e96611..08cc533 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,43 @@ -# Variable Conversion 命名方式转换插件 +# 命名方式转换插件 Variable Conversion -A variable naming conversion extension. You can use it through the editer menu, shortcut keys and bottom bar. Support camel, pascal, snake, kebab(spinal), lower, upper case, and more. +一个强大的变量名转换插件,支持常用命名方式间一键转换,支持右键菜单、快捷键、底栏等多种方式使用。
+A powerful variable naming conversion extension. You can use it through the editer menu, shortcut keys and bottom bar. -变量名转换插件,支持右键菜单、快捷键、底栏等多种方式使用,支持小驼峰、大驼峰(帕斯卡)、下划线(蛇形)、连字符(脊柱式)、全小写、全大写等常用命名方式(及组合)转换。 +## 如何使用? How to Use? -## Features 特点 +1. 选中代码中需要转换的内容
Select The Text To Convert -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. +![Step1. Select The Text To Convert](image/step1-select-the-text-to-convert.gif) -For example if there is an image subfolder under your extension project workspace: +> Tips:
+> 可以通过 `Ctrl + D` 快捷键选中光标所在的单词
+> You can press `Ctrl + D` to select the word near the cursor -\!\[feature X\]\(images/feature-x.png\) +2. 按 `Shift + Alt + T`
Press `Shift + Alt + T` -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. +![Step2. Press Shift + Alt + T](image/step2-press-shift-alt-t.gif) -## Requirements +或者右键 -> 将字符串转换为...
Or right-click on the selected text -> Convert string to... -If you have any requirements or dependencies, add a section describing those and how to install and configure them. +![Step2. Right-click on the selected text](image/step2-right-click-on-the-selected-text.gif) + +选择转换目标,转换完成 + +## 反馈 Feedback + +如果您觉得本插件还不够好用,有更好的使用建议;或者发现了 BUG,欢迎[前往 GitHub 仓库提 issue](https://github.com/coder-xiaomo/variable-conversion-vscode-extension/issues). 使用简体中文、繁體中文或 English 均可,不建议使用翻译软件翻译,否则可能会让文字描述变得抽象难懂。
+If you feel that this extension is not good to use, or you have a better use suggestion, or found a BUG, welcome to [create an issue on GitHub](https://github.com/coder-xiaomo/variable-conversion-vscode-extension/issues). English, 简体中文 or 繁體中文 are all supported, it is not recommended to use translation software, otherwise it may make the text description become abstract and difficult to understand. + +## 开源共建 OpenSource & Contribute + +本插件已开源(MIT License),欢迎提 Pr 共建,让插件变得更好用!
+This plug-in has been open source (MIT License), welcome to Pr co-construction, let the plug-in become better! + +GitHub Repo (开源地址): https://github.com/coder-xiaomo/variable-conversion-vscode-extension.git + +Gitee Mirror (码云镜像): https://gitee.com/coder-xiaomo/variable-conversion-vscode-extension.git + + **Enjoy!** diff --git a/image/step1-select-the-text-to-convert.gif b/image/step1-select-the-text-to-convert.gif new file mode 100644 index 0000000..b170090 Binary files /dev/null and b/image/step1-select-the-text-to-convert.gif differ diff --git a/image/step2-press-shift-alt-t.gif b/image/step2-press-shift-alt-t.gif new file mode 100644 index 0000000..4d1daa1 Binary files /dev/null and b/image/step2-press-shift-alt-t.gif differ diff --git a/image/step2-right-click-on-the-selected-text.gif b/image/step2-right-click-on-the-selected-text.gif new file mode 100644 index 0000000..2dbc957 Binary files /dev/null and b/image/step2-right-click-on-the-selected-text.gif differ diff --git a/package-comment.jsonc b/package-comment.jsonc index 6c9d693..aabab5e 100644 --- a/package-comment.jsonc +++ b/package-comment.jsonc @@ -1,7 +1,7 @@ { // 插件 id 及名称 "name": "variable-conversion", - "displayName": "Variable Conversion [Under development(正在开发中)]", + "displayName": "Variable Conversion", "description": "一个强大的变量名转换插件,支持右键菜单、快捷键、底栏等多种方式使用,支持小驼峰、大驼峰(帕斯卡)、下划线(蛇形)、连字符(脊柱式)、全小写、全大写等常用命名方式(及组合)转换。 \nA powerful variable naming conversion extension. You can use it through the editer menu, shortcut keys and bottom bar. Support camel, pascal, snake, kebab(spinal), lower, upper case, and more.", // 版本号 "version": "0.0.4", diff --git a/package.json b/package.json index bd89d8b..0404f42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "variable-conversion", - "displayName": "Variable Conversion [Under development(正在开发中)]", + "displayName": "Variable Conversion", "description": "一个强大的变量名转换插件,支持右键菜单、快捷键、底栏等多种方式使用,支持小驼峰、大驼峰(帕斯卡)、下划线(蛇形)、连字符(脊柱式)、全小写、全大写等常用命名方式(及组合)转换。 \nA powerful variable naming conversion extension. You can use it through the editer menu, shortcut keys and bottom bar. Support camel, pascal, snake, kebab(spinal), lower, upper case, and more.", "version": "0.0.4", "icon": "image/logo.png", diff --git a/src/type-definition/SupportCaseType.ts b/src/type-definition/SupportCaseType.ts index c2e5675..93144a2 100644 --- a/src/type-definition/SupportCaseType.ts +++ b/src/type-definition/SupportCaseType.ts @@ -144,38 +144,44 @@ const keyword = { camel: [ '小驼峰', '驼峰', 'Camel Case', + 'cc', 'XiaoTuoFeng', 'TuoFeng', - 'XTF', 'TF', + 'xtf', 'tf', ], pascal: [ '大驼峰', '帕斯卡', 'Pascal Case', + 'pc', 'DaTuoFeng', 'PaSiKa', - 'DTF', 'PSK', + 'dtf', 'psk', ], snake: [ '下划线', '蛇形', '_', 'Snake Case', 'Underline Case', + 'sc', 'uc', 'XiaHuaXian', 'SheXing', - 'XHX', 'SX', + 'xhx', 'sx', ], kebab: [ '连字符', '脊柱式', '-', 'Kebab Case', 'Spinal Case', + 'kc', 'sc', 'LianZiFu', 'JiZhuShi', - 'LZF', 'JZS', + 'lzf', 'jzs', ], upper: [ '全大写', '大写', 'Upper Case', + 'uc', 'QuanDaXie', - 'QDX', + 'qdx', ], lower: [ '全小写', '小写', 'Lower Case', + 'lc', 'QuanXiaoXie', - 'QXX', + 'qxx', ], }; @@ -187,73 +193,73 @@ export const qickPickSupportCases = [ { type: SupportCase.CAMEL_CASE, name: '小驼峰(驼峰)命名', - shortName:'小驼峰', + shortName: '小驼峰', keyword: keyword.camel, }, { type: SupportCase.PASCAL_CASE, name: '大驼峰(帕斯卡)命名', - shortName:'帕斯卡', + shortName: '帕斯卡', keyword: keyword.pascal, }, { type: SupportCase.SNAKE_CASE, name: '下划线(蛇形)命名', - shortName:'蛇形', + shortName: '蛇形', keyword: [...keyword.snake, ...keyword.lower], }, { type: SupportCase.SNAKE_CAMEL_CASE, name: '下划线(蛇形) + 小驼峰(驼峰)命名', - shortName:'蛇形驼峰', + shortName: '蛇形驼峰', keyword: [...keyword.snake, ...keyword.camel], }, { type: SupportCase.SNAKE_PASCAL_CASE, name: '下划线(蛇形) + 大驼峰(帕斯卡)命名', - shortName:'蛇形帕斯卡', + shortName: '蛇形帕斯卡', keyword: [...keyword.snake, ...keyword.pascal], }, { type: SupportCase.SNAKE_UPPER_CASE, name: '下划线(蛇形) + 全大写命名', - shortName:'蛇形大写', + shortName: '蛇形大写', keyword: [...keyword.snake, ...keyword.upper], }, { type: SupportCase.KEBAB_CASE, name: '连字符(脊柱式)命名', - shortName:'脊柱', + shortName: '脊柱', keyword: [...keyword.kebab, ...keyword.lower], }, { type: SupportCase.KEBAB_CAMEL_CASE, name: '连字符(脊柱式) + 小驼峰(驼峰)命名', - shortName:'脊柱驼峰', + shortName: '脊柱驼峰', keyword: [...keyword.kebab, ...keyword.camel], }, { type: SupportCase.KEBAB_PASCAL_CASE, name: '连字符(脊柱式) + 大驼峰(帕斯卡)命名', - shortName:'脊柱帕斯卡', + shortName: '脊柱帕斯卡', keyword: [...keyword.snake, ...keyword.pascal], }, { type: SupportCase.KEBAB_UPPER_CASE, name: '连字符(脊柱式) + 全大写命名', - shortName:'脊柱大写', + shortName: '脊柱大写', keyword: [...keyword.snake, ...keyword.upper], }, { type: SupportCase.LOWER_CASE, name: '全小写', - shortName:'小写', + shortName: '小写', keyword: keyword.lower, }, { type: SupportCase.UPPER_CASE, name: '全大写', - shortName:'大写', + shortName: '大写', keyword: keyword.upper, }, ];