在VSCode IDE中,我的代碼注釋一般都有高亮顏色,那要怎么安裝這個插件呢?請看步驟
PS:注線插件是 highlight line,界面主題是 One Dark Pro Flat
- 打開你的Vscode!
- 點擊擴展
- 搜索better comments,點擊安裝
- 打開你的setting.json,找不到怎么辦,請跟着這個步驟來
- 添加如下代碼,記得確保代碼添加在
{ }
里,包含在內不要加到外面去了,並保證前面有半角逗號,
- 重啟VSCode
正確的結構應該是
{
"better-comments.tags": [
...
...
...
]
}
# 如果有其他插件
{
"better-comments.tags": [
...
...
...
],
"bbb":[
...
],
"aaa":{}
}
代碼
"better-comments.tags": [
{
"tag": "!!",
"color": "#FF2D00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "?",
"color": "#3498DB",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "、、",
"color": "#474747",
"strikethrough": true,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "!",
"color": "#FF8C00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "info",
"color": "#CCFFFF",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "tip",
"color": "#CCFFFF",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "important",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "example",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "坑",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "可以刪除",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "future",
"color": "#CCFFFF",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "未完成",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "@",
"color": "#CCFFFF",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "test",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "warn",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "step",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "^",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "fixme",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "mistake",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "fail",
"color": "#FFFFCC",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "***",
"color": "#98C379",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
}
]