[Windows]Visual Studio Code个人配置
2021-06-01 10:01
标签:class wchar wal ati bind cep set one c++ 打开这个: 第三个需要安装插件: 第四个需要安装插件: 快捷键设置 打开位置同理 想要进行编译: 配置编译器位置和语言 暂时不知道有什么用 编译命令 除了上述两个 还有: 前两个是C++语言的配置 最后一个是中文汉化 [Windows]Visual Studio Code个人配置 标签:class wchar wal ati bind cep set one c++ 原文地址:https://www.cnblogs.com/Miracevin/p/10986522.html编辑器要添加的
settings.json
{
"editor.fontSize": 20,//编辑字号
"files.autoSave": "afterDelay",//自动保存
"workbench.colorTheme": "One Monokai",//主题
"command-runner.commands": {
"Run": "start cmd /c \"C:\\Program Files (x86)\\Dev-Cpp\\ConsolePauser.exe\" ${fileDirname}\\${fileBasenameNoExtension}"
}//方便一键运行
}
keybindings.json
[
{
"key": "f11",
"command": "workbench.action.tasks.build"
},//编译运行
{
"key": "f10",
"command": "command-runner.run",
"args":{
"command": "Run"
},
"when": "editorTextFocus"
}//运行,配合上面的command runner插件
]
每个文件内
c_cpp_properties.json
{
"configurations": [
{
"name": "MinGW",
"intelliSenseMode": "gcc-x64",
"compilerPath": "C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/g++.exe",//编译器位置,安装Dev C++才有这个路径。。。
"includePath": [
"${workspaceFolder}"
],
"cStandard": "c11",
"cppStandard": "c++11"
}
],
"version": 4
}
settings.json
{
"files.associations": {
"array": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"cfenv": "cpp",
"chrono": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"fstream": "cpp",
"functional": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"ostream": "cpp",
"numeric": "cpp",
"ratio": "cpp",
"scoped_allocator": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"system_error": "cpp",
"thread": "cpp",
"type_traits": "cpp",
"tuple": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"utility": "cpp",
"valarray": "cpp"
}
}
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Compile",
"type": "shell",
"command": "g++ -Wall -std=c++11 -O2 -Wl,-stack=512000000 \"${file}\" -o \"${fileDirname}\\${fileBasenameNoExtension}\" && start cmd /c \"C:\\Program Files (x86)\\Dev-Cpp\\ConsolePauser.exe\" ${fileDirname}\\${fileBasenameNoExtension}",
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Run",
"type": "shell",
"command": "start cmd /c \"C:\\Program Files (x86)\\Dev-Cpp\\ConsolePauser.exe\" ${fileDirname}\\${fileBasenameNoExtension}",
"problemMatcher": []
},
{
"type": "shell",
"label": "g++.exe build active file",
"command": "C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "C:/Program Files (x86)/Dev-Cpp/MinGW64/bin"
}
}
]
}
额外插件
效果图
上一篇:MVC模式
文章标题:[Windows]Visual Studio Code个人配置
文章链接:http://soscw.com/index.php/essay/89904.html