vscode是一款编辑器,而不是IDE
c/c++
.vscode目录下有4个文件,它们分别是c_cpp_properties.json,*.code-workspace,settings.json,tasks.json。c_cpp_proerties.json里配置的includePath,只是在编辑代码时提供智能提示的帮助,而编译时如果要配置includepath,应该是tasks.json里配置。
includePath in c_cpp_properties.json not working in VSCode for C
The c_cpp_properties.json controls, among other things, where intellisense in the IDE resolves include files. The IDE and the build tasks are independent things and as a result, configured and operate independently in VS Code.
The solution to your problem is to add the include path to your tasks.json file, as follows:
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"--include-directory=/usr/include/glib-2.0/"
],
code snippets
VSC支持多种语言生成代码片断-官方链接
Extensions 搜索 “C/C++ Snippets”
设定自己的code snippets
方法:左下角Manage->Configure User Snippets,默认.json文件是存放在C盘,所以如果更换了操作系统,自设定的Snippets会失效。
插件安装
pylint
链接在这里vscode Python Pylint(代码检测插件)
VSCodeVim
这里要注意的是如果需要修改vim扩展的一些功能,需要在全局的settings.json里修改,一般路径是C:\Users\xxxxx\AppData\Roaming\Code\User\settings.json
,如果是在单个工程的settings.json里配置,可能会出现对应的vim的json配置字段为灰色(失效)。一个简单的Vim按键映射功能,可以通过如下字段配置实现(j -> gj,即实际行向下改为屏幕行向下):
"vim.normalModeKeyBindings": [
{
"before": ["j"],
&