博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Windows]Visual Studio Code个人配置
阅读量:5933 次
发布时间:2019-06-19

本文共 3885 字,大约阅读时间需要 12 分钟。

编辑器要添加的

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"            }        }    ]}

额外插件

除了上述两个

还有:

 

前两个是C++语言的配置

最后一个是中文汉化

效果图

 

转载于:https://www.cnblogs.com/Miracevin/p/10986522.html

你可能感兴趣的文章
记录基于VMware虚拟机, Linux7.2下外部主机访问配置
查看>>
Java进阶之美文共享
查看>>
实验吧_认真一点(各种绕过下的盲注)
查看>>
OAuth
查看>>
DBCP连接池介绍
查看>>
关于System.Collections空间
查看>>
python学习笔记之——python面向对象
查看>>
Sara Cope关于text-shadow的介绍
查看>>
【转载】两军问题与Paxos算法 & 动画讲解Paxos算法
查看>>
外排序 & 败者树 & 多路归并-学习
查看>>
font-family 定义的最后为什么要加一句sans-serif
查看>>
IoC和DI的基本概念的思维导图
查看>>
LDA 初见(JGibbLDA-v.1.0 eclipse使用)
查看>>
xargs命令
查看>>
PHP解决约瑟夫环问题
查看>>
网页中的上标和下标实现
查看>>
Windows 08R2 IIS网站架设
查看>>
数据库 出现 Duplicate column name '****'
查看>>
Codeforces 14D
查看>>
A+B
查看>>