UML插件
PlantUML - Simple Viewer
ALT+D 进行 preview
配置 Source Insight 主题
- ctrl+,打开settiong
- 搜索 editor.tokenColorCustomizations
- 点击Edit in settings.json,填入如下内容
{
"cmake.configureOnOpen": true,
"explorer.confirmDelete": false,
"git.ignoreMissingGitWarning": true,
"workbench.colorTheme": "Visual Studio Light",
"security.workspace.trust.untrustedFiles": "open",
"C_Cpp.default.compilerPath": "C:\\Strawberry\\c\\bin\\g++.exe",
"redhat.telemetry.enabled": true,
"workbench.tree.indent": 20,
"workbench.iconTheme": "vs-minimal",
"editor.fontSize": 13,
"cmake.showOptionsMovedNotification": false,
"workbench.colorCustomizations": {
"[Visual Studio Light]": {
"editor.background": "#ffffff", // 90EE90 8ae496 背景色
"sideBar.background": "#cbd6e5", //侧边色
"activityBar.background": "#4682B4", //活动栏颜色
},
},
"editor.tokenColorCustomizations": {
"comments": "#808080", // 注释
"keywords": "#FF00FF", // 关键字
"functions": "#000080", // 函数名
"variables": "#800080", // 变量名
"numbers": "#ff0000", // 数字
"types": "#008000", // 类型
"strings": "#000000", // 字符串
"[Visual Studio Light]": {
"textMateRules": [
{
"scope": [
"storage.type.class", //注释
],
"settings": {
"foreground": "#2F4F4F",
"fontStyle": ""
}
},
{
"scope": [
"keyword.other", //其他关键字 typedef
],
"settings": {
"foreground": "#ff00ff",
"fontStyle": ""
}
},
{
"scope": [
"keyword.control.directive", // 与宏相关的关键字
"punctuation.definition.directive", // 与宏相关的关键字符号 "#"
],
"settings": {
"foreground": "#ff00ff",
"fontStyle": "bold"
}
},
{
"scope": [
"punctuation.separator.dot-access", //语法符号,视作关键字 符号 "."
"punctuation.separator.pointer-access", //语法符号,视作关键字 符号 "->"
"keyword.operator", //语法符号,视作关键字 运算符
],
"settings": {
"foreground": "#ff00ff",
"fontStyle": ""
}
},
{
"scope": [
"entity.name.function", // 函数名
"keyword.operator.sizeof", // 库函数
],
"settings": {
"foreground": "#000080",
"fontStyle": "bold"
}
},
{
"scope": [
"variable.parameter", // 形参,视作函数的一部分
],
"settings": {
"foreground": "#000080",
"fontStyle": ""
}
},
{
"scope": [
"variable.other.global", //全局变量
],
"settings": {
"foreground": "#800080",
"fontStyle": "bold"
}
},
{
"scope": [
"variable.other.local", // 局部变量
"variable.other.property", // 结构体的字段
"punctuation", //一般的标点符号
],
"settings": {
"foreground": "#800080",
"fontStyle": ""
}
},
{
"scope": [
"entity.name.function.preprocessor", // 宏定义
],
"settings": {
"foreground": "#ff0000",
"fontStyle": "bold"
}
},
{
"scope": [
"constant.numeric", // 数值
"variable.other.enummember" //枚举值
],
"settings": {
"foreground": "#ff0000",
"fontStyle": "italic"
}
},
{
"scope": [
"storage.type.built-in.primitive.c", //自带的类型
"storage.type", // struct关键字
"storage.modifier", // const, static
],
"settings": {
"foreground": "#008000",
"fontStyle": ""
}
},
{
"scope": [
"string"
],
"settings": {
"foreground": "#000000",
"fontStyle": "",
}
},
{
"scope": [
"string.quoted.double.include",
"string.quoted.other.lt-gt.include", //头文件
"constant",
],
"settings": {
"foreground": "#0000FF",
"fontStyle": ""
}
},
],
},
},
}
所有文件都是用 LF 代替 CRLF
- 下载插件 EditorConfig for VS Code
- 工程根目录下创建配置文件 .editorconfig 文件
- 填入如下内容
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false