1.插件安装:
2.软件配置:
c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"D:/SoftwareFile/Microsoft Visual Studio 12.0/VC/include/"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"__CC_ARM"
],
"intelliSenseMode": "msvc-x64",
"cStandard": "c99",
"cppStandard": "c++20"
}
],
"version": 4
}
setttings.json
{
"C_Cpp.default.cStandard": "c99",
"editor.fontSize": 18,
"files.encoding": "gb2312",
"window.zoomLevel": 0,
"workbench.colorCustomizations": {
"editor.selectionHighlightBackground": "#79562f"
},
"editor.semanticHighlighting.enabled": true,
"editor.renderWhitespace": "all",
"bookmarks.navigateThroughAllFiles": true,
"bookmarks.saveBookmarksInProject": true,
"workbench.sideBar.location": "left",
"C_Cpp.updateChannel": "Insiders",
"http.proxySupport": "off",
"files.exclude": {
"**/*.bak": true
},
"editor.detectIndentation": false,
"fileheader.customMade": { //此为头部注释
"Description": "",
"Version": "",
"Autor": "",
"Date": "Do not edit",
"LastEditors": "",
"LastEditTime": "Do not edit"
},
"fileheader.cursorMode": { //此为函数注释
"description":"",
"param":"",
"return":""
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"workbench.iconTheme": "material-icon-theme",
"todo-tree.tree.showScanModeButton": false,
"better-comments.highlightPlainText": true,
"better-comments.tags": [
{
"tag": "!",
"color": "#FF2D00",
"strikethrough": false,
"backgroundColor": "transparent"
},
{
"tag": "?",
"color": "#3498DB",
"strikethrough": false,
"backgroundColor": "transparent"
},
{
"tag": "//",
"color": "#474747",
"strikethrough": true,
"backgroundColor": "transparent"
},
{
"tag": "todo",
"color": "#FF8C00",
"strikethrough": false,
"backgroundColor": "transparent"
},
{
"tag": "*",
"color": "#98C379",
"strikethrough": false,
"backgroundColor": "transparent"
}
]
}
3.格式化代码:
由于插件已经安装了C/C++,则配置Clang_format_style,使用其功能之
4.快捷键:
KoroFileHeader:“ctrl+alt+t”在光标处添加函数注释
“ctrl+alt+i”文件头部添加注释
VS-Code: