vscode 的使用
1、VScode:添加頭文件路徑
按F1
或 Ctrl+Shift+p
在彈出的備選選項中選擇 C/C++:Edit Configuration(JSON)
,自動打開c_cpp_properties.json
配置文件
在includePath中添加頭文件路徑
"includePath": [ "${workspaceFolder}/**", "~/ros2_install/ros2-linux/**"
2、樣式修改
打開setting.json,復制下面:
{ "editor.fontFamily": "Consolas, 'Courier New', monospace", "editor.codeLensFontSize": 18, "editor.fontSize": 18, "workbench.colorTheme": "Visual Studio Light - C++", "editor.defaultFormatter": "ms-vscode.cpptools", "editor.definitionLinkOpensInPeek": true, "editor.fontLigatures": false, "cmake.configureOnOpen": true, "editor.codeActionsOnSave": null }