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 |
| | |

相关推荐
晴天161 小时前
VSCodium 项目介绍
前端·javascript·vscode
学习智者5 小时前
《玄》IDE v3.6.3重磅发布:全功能修复与性能飞跃
开发语言·c++·ide·算法·中文语言 玄
重生之小比特6 小时前
【Java SE】IDEA 调试 Debug 案例完整分析
java·ide·intellij-idea
Danny_姜8 小时前
Android Studio Quail 4 稳定版发布:本地 Gemma 4 + Android Skills
android·ide·android studio
withoutfear1 天前
IntelliJ IDEA卡顿内存分配不足和索引被频繁触发问题解决办法
java·ide·intellij-idea
寥落半伤感1 天前
在Pycharm中一键迅速安装包及查看虚拟环境中包名的方法
ide·python·pycharm
进击的炸酱面1 天前
如何在服务器中使用codex?代理配置一图详解
ide·vscode·ssh
持敬chijing1 天前
VSCode 远程开发环境完整搭建指南:汉化、SSH 免密连接与版本更新锁定
ide·vscode·ssh
郝学胜-神的一滴2 天前
C++11 工程级应用 09:告别无谓拷贝,解锁高性能移动语义
开发语言·数据结构·c++·vscode·软件工程·visual studio
weixin_402486342 天前
VS Code Codex/Claude Extension 无法安装 / 无法正常打开
linux·服务器·vscode