Giter VIP home page Giter VIP logo

coder-xiaomo / variable-conversion-vscode-extension Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 877 KB

一个强大的变量名转换插件,支持一键转换、循环转换,支持右键菜单、快捷键、状态栏等多种方式使用。 A powerful variable naming conversion extension. Supports one-key conversion & cyclic conversion. You can use it through the editer menu, shortcut keys and bottom bar.

Home Page: https://marketplace.visualstudio.com/items?itemName=coder-xiaomo.variable-conversion

License: MIT License

JavaScript 0.10% TypeScript 99.90%
vscode vscode-extension variable-conversion

variable-conversion-vscode-extension's Introduction

变量命名转换插件 Variable Conversion

Marketplace GitHub Gitee

一个强大的变量名转换插件,支持一键转换、循环转换,支持右键菜单、快捷键、状态栏等多种方式使用。
A powerful variable naming conversion extension. Supports one-key conversion & cyclic conversion. You can use it through the editer menu, shortcut keys and bottom bar.

  • ✅ 支持多选区 Support multi-selection
  • ✅ 支持多窗口 Support subwindow
  • ✅ 支持撤回 & 重做 Support undo & redo (Ctrl + Z / Ctrl + Y)
  • ✅ 支持禁用部分目标转换格式 Supports disabling some target conversion formats

🔭 Tips for Chinese users: 如果您无法看到下文图片,请点这里查看

如何使用? How to Use?

循环转换 Cyclic conversion (Beta)

选中需要转换的内容,然后按下 Ctrl + Alt + [Ctrl + Alt + ] 即可前后灵活切换变量命名方式。
Select what you want to convert in the editor, and then press Ctrl + Alt + [ or Ctrl + Alt + ] to flexibly convert variable name flexibly.

基础转换 Basic conversion

1. 选中代码中需要转换的内容 Select The Text To Convert

Step1. Select The Text To Convert

2. 按 Shift + Alt + T Press Shift + Alt + T

Step2. Press Shift + Alt + T

或者点击状态栏的 变量转换 按钮
Or click the String Conversion button in the status bar

Step2. Press Status Bar Button

或者右键 -> 变量转换
Or right-click -> String Conversion

Step2. Variable conversion on the context menu

或者右键 -> 将变量转换为...
Or right-click on the selected text -> Convert string to...

Step2. Right-click on the selected text

3. 选择转换目标,转换完成 Select the conversion target and complete

快捷键 Shortcut key

功能 Feature 快捷键 shortcut key
变量转换 快速选择 QuickPick Shift + Alt + T
循环转换→上一个 Cyclic conversion → Previous one Ctrl + Alt + [
循环转换→下一个 Cyclic conversion → Next one Ctrl + Alt + ]

配置项 configurations

配置项 Configuration Key 描述 Description 配置示例 默认值
variable-conversion.disableFormat 定义哪些格式是禁用的
Define which formats are disabled.
["lower_case", "upper_case"] []

支持的类型 Support Case

类型 Case 举例 e.g.
小驼峰(驼峰)命名 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

小提示 Tips

关于文本选区... About text selections...

  • 可以先按住 Alt 键不放,再鼠标先后选中多个选区 You can first hold down Alt, and then use the mouse to select multiple selection
  • 可以先按住 Shift + Alt 键不放,再按下鼠标左键,使用鼠标滑过需要选中的区块 You can first hold down Shift + Alt, then press the left mouse button, and use the mouse to slide over the block that needs to be selected
  • 可以通过 Ctrl + D 快捷键选中光标所在的单词 You can press Ctrl + D to select the word near the cursor

反馈 Feedback

如果您觉得本插件还不够好用,有更好的使用建议;或者发现了 BUG,欢迎前往 GitHub 仓库提 issue. 使用简体中文、繁體中文或 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. 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!

variable-conversion-vscode-extension's People

Contributors

coder-xiaomo avatar

Stargazers

 avatar  avatar

Watchers

 avatar

variable-conversion-vscode-extension's Issues

可以指定转换为某几种格式吗

比如我其实只需要大驼峰和蛇形 只要能在这两个里面转换就行了
当然 加入原始是小驼峰 也需要能先转为大驼峰 然后再大驼峰和蛇形里面转

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.