vscode 使用

目录

Settings

1、vscode显示120字符或者80字符提示线

Extensions

[1、 git commit message helper](#1、 git commit message helper)


Settings

1、vscode显示120字符或者80字符提示线

1、 File -> Preferences -> Settings

2、 Search settings:editor:rulers

3、setting.json 文件中配置 "editor:rulers"

javascript 复制代码
"editor.rulers": [        
    { "column": 80, "color": "#00ff4c" },
    { "column": 100, "color": "#ff00ff" },
    { "column": 120, "color": "#ff0000" }
]

4、语句长度

一条常见但有点过时的规则,就是语句长度应限制在80个字符以内,理由如下。

■ 超过80个字符的语句很难读。

■ 80个字符的限制不鼓励深度嵌套。

■ 长于80字符的语句行在8.5×11英寸规格纸张上放不下,特别是当一面打印

两栏代码时(每张物理输出页面打印两页代码)。

有了大幅面的显示器、窄的字体和横向打印模式,80个字符/行的限制日益显

得武断了。一行上有90个字符常比为避免超出80个字符将其拆分为两行要容易

读得多。

常见的代码行长度限制为 80 或 120 字符,具体根据公司团队、项目类型,可以定制不同编码规范。

Extensions

1、 git commit message helper

Git commit message helper - Visual Studio Marketplace

1、install

2、使用

使用一:

  • main: Added

</> main: Fixed

|| main: Removed

<- -> main: Updated

使用二:

Ctrl + Shift + P 搜索> git prefix

3、Type

|----------|-------------------------------------------------------------------------------------------------------------|
| feat | A new feature |
| fix | A bug fix |
| docs | Documentation only changes |
| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
| refactor | A code change that neither fixes a bug nor adds a feature |
| perf | A code change that improves performance |
| test | Adding missing tests or correcting existing tests |
| build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |
| chore | Other changes that don't modify src or test files |
| revert | Reverts a previous commit |
| | |

相关推荐
Joy T6 小时前
voice-dump-to-todo:把混乱的语音整理成可执行待办,一个实用的 Agent Skill
ide·macos·语音识别·xcode·任务管理·自研skill
人工智能导论实践课9 小时前
【GUI桌面开发3】PyCharm配置外部工具
ide·python·pycharm
golang学习记10 小时前
Zed Git重大更新:目录级对比支持分栏Diff
git·vscode·zed
JPower_mr.g13 小时前
SmartCall v1.0.9 发布:智能体知识库上线,让 AI 客服先查资料再回答
java·ide·人工智能·macos·架构·开源·xcode
Dev _14 小时前
PyCharm旧进程仍在后台运行,导致新实例无法启动或连接
ide·python·pycharm
无巧不成书021817 小时前
Tomcat部署JSP文件完整指南:手动部署+IDEA工程化实现 附404访问错误全排查
java·ide·windows·tomcat·intellij-idea·js
曹牧18 小时前
Eclipse:Subclipse
java·ide·eclipse
2601_9540056218 小时前
# ricon SVG 编辑器:工业图元的“军火工厂“
前端·物联网·数学建模·架构·编辑器·制造
allanGold19 小时前
Android Studio 无线调试
android·ide·android studio
2501_9151063220 小时前
iOS 单元测试怎么跑?用 KXApp 在 VS Code 里跑 XCTest 和 Swift Testing
ide·vscode·ios·单元测试·个人开发·swift·敏捷流程