VSCode C++环境配置文件

c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.17763.0",
            "compilerPath": "D:/mingw64/bin/g++.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "${default}"
        }
    ],
    "version": 4
}

launch.json

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug",
            "type": "cppdbg",
            "request": "launch",
            "program": "E:\\CodeFile\\Cpp\\bin\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "internalConsoleOptions": "neverOpen",
            "MIMode": "gdb",
            "miDebuggerPath": "D:\\mingw64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "为 gdb 启用整齐打印",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "build"
        }
    ]
}

settings.json

{
    "files.associations": {
        "iostream": "cpp",
        "xtr1common": "cpp",
        "xutility": "cpp",
        "vector": "cpp",
        "ostream": "cpp",
        "xstring": "cpp",
        "new": "cpp",
        "array": "cpp",
        "atomic": "cpp",
        "*.tcc": "cpp",
        "bitset": "cpp",
        "cctype": "cpp",
        "clocale": "cpp",
        "cmath": "cpp",
        "cstdarg": "cpp",
        "cstddef": "cpp",
        "cstdint": "cpp",
        "cstdio": "cpp",
        "cstdlib": "cpp",
        "cstring": "cpp",
        "ctime": "cpp",
        "cwchar": "cpp",
        "cwctype": "cpp",
        "deque": "cpp",
        "unordered_map": "cpp",
        "exception": "cpp",
        "algorithm": "cpp",
        "iterator": "cpp",
        "map": "cpp",
        "memory": "cpp",
        "memory_resource": "cpp",
        "optional": "cpp",
        "regex": "cpp",
        "set": "cpp",
        "string": "cpp",
        "string_view": "cpp",
        "system_error": "cpp",
        "tuple": "cpp",
        "type_traits": "cpp",
        "utility": "cpp",
        "fstream": "cpp",
        "initializer_list": "cpp",
        "iosfwd": "cpp",
        "istream": "cpp",
        "limits": "cpp",
        "sstream": "cpp",
        "stdexcept": "cpp",
        "streambuf": "cpp",
        "typeinfo": "cpp",
        "list": "cpp",
        "functional": "cpp",
        "numeric": "cpp",
        "unordered_set": "cpp",
        "chrono": "cpp"
    },
    "code-runner.executorMap": {
        "c": "cd $dir && gcc $fileName -o E:\\CodeFile\\Cpp\\bin\\$fileNameWithoutExt && E:\\CodeFile\\Cpp\\bin\\$fileNameWithoutExt",
        "cpp":"cd $dir && g++ $fileName -o E:\\CodeFile\\Cpp\\bin\\$fileNameWithoutExt && E:\\CodeFile\\Cpp\\bin\\$fileNameWithoutExt"
    },
    "code-runner.clearPreviousOutput": true,
    "editor.fontFamily": "JetBrainsMonoNL NF, Consolas, Consolas, 'Courier New', monospace",
    "editor.fontSize": 18 //在这里面设置runcoder生成的.exe文件到指定的文件夹
}

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "shell",
            "label": "build",
            "command": "g++",
            "args": [
                "-g",
                "${file}",
                "-o",
                "E:\\CodeFile\\Cpp\\bin\\${fileBasenameNoExtension}.exe",
                "-static-libgcc",
                "-std=c++11"
            ],
            "group": "build",
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "new"
            },
            "problemMatcher": "$gcc"
        },
        {
            "label": "run",
            "type": "shell",
            "dependsOn": "build",
            "command": "E:\\CodeFile\\Cpp\\bin\\${fileBasenameNoExtension}.exe",
            "group": {
                "kind": "test",
                "isDefault": true
            },
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": true,
                "panel": "new"
            }
        },
        {
            "type": "cppbuild",
            "label": "C/C++: g++.exe 生成活动文件",
            "command": "D:/mingw64/bin/g++.exe",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "E:\\CodeFile\\Cpp\\bin\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd": "D:/mingw64/bin"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "调试器生成的任务。"
        }
    ]
}

系统设置文件

{
    "code-runner.runInTerminal": true,

    "terminal.integrated.profiles.windows": {
        "Command Prompt": {
            "path": "C:\\Windows\\System32\\cmd.exe",
            "args": ["-NoExit", "/K", "chcp 65001"]
        },
        "PowerShell": {
            "source": "PowerShell",
            "args": ["-NoExit", "/C", "chcp 65001"]//防止utf8输出中文乱码
        }
    },
    //命令窗口默认使用powershell
    "terminal.integrated.defaultProfile.windows": "PowerShell",
    "editor.fontFamily": "JetBrainsMonoNL NF, Consolas, 'Courier New', monospace",
    "[cpp]": {

        "files.autoGuessEncoding": true,
        "files.encoding": "utf8"
        
        },
        "[c]": {
        
        "files.autoGuessEncoding": true,
        "files.encoding": "utf8"
        
        },
        "workbench.iconTheme": "material-icon-theme",
        "explorer.confirmDelete": false,
        "editor.mouseWheelZoom": true,
        "http.proxySupport": "off",
        "explorer.confirmDragAndDrop": false,
        "remote.SSH.remotePlatform": {
            "ubuntu": "linux",
            "alias": "linux",
            "虚拟机": "linux",
            "NUAA": "linux",
            "Aliyun": "linux"
        },
        "terminal.integrated.fontSize": 17,
        "files.eol": "\n",
        "[markdown]": {
            "editor.quickSuggestions": {
                "comments": "on",
                "strings": "on",
                "other": "on"
            }
        },
        "oneDarkPro.editorTheme": "oneDarkPro",
        "evermonkey.noteStoreUrl": "https://app.yinxiang.com/shard/s10/notestore",
        "evermonkey.token": "S=s10:U=2246026:E=17ab9e68085:C=17a95d9fc68:P=1cd:A=en-devtoken:V=2:H=72ab258bf0b3d7b7f75ec4c1e218c7f8",
        "code-runner.executorMap": {



            "javascript": "node",
            "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
            "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "php": "php",
            "python": "python -u",
            "perl": "perl",
            "perl6": "perl6",
            "ruby": "ruby",
            "go": "go run",
            "lua": "lua",
            "groovy": "groovy",
            "powershell": "powershell -ExecutionPolicy ByPass -File",
            "bat": "cmd /c",
            "shellscript": "bash",
            "fsharp": "fsi",
            "csharp": "scriptcs",
            "vbscript": "cscript //Nologo",
            "typescript": "ts-node",
            "coffeescript": "coffee",
            "scala": "scala",
            "swift": "swift",
            "julia": "julia",
            "crystal": "crystal",
            "ocaml": "ocaml",
            "r": "Rscript",
            "applescript": "osascript",
            "clojure": "lein exec",
            "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
            "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
            "racket": "racket",
            "scheme": "csi -script",
            "ahk": "autohotkey",
            "autoit": "autoit3",
            "dart": "dart",
            "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
            "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
            "haskell": "runhaskell",
            "nim": "nim compile --verbosity:0 --hints:off --run",
            "lisp": "sbcl --script",
            "kit": "kitc --run",
            "v": "v run",
            "sass": "sass --style expanded",
            "scss": "scss --style expanded",
            "less": "cd $dir && lessc $fileName $fileNameWithoutExt.css",
            "FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
        },
        "remote.SSH.showLoginTerminal": true,
        "code-runner.clearPreviousOutput": true,
        "extensions.ignoreRecommendations": true,
        "C_Cpp.errorSquiggles": "Enabled",
        "remote.SSH.configFile": "C:\\Users\\12161\\.ssh\\config",
        "files.autoGuessEncoding": true,
        "vim.leader": ",",
        "vim.statusBarColors.searchinprogressmode": "#007acc",
        "vim.statusBarColors.insert": "#5f0000",
        "vim.statusBarColors.normal": "#005f5f",
        "vim.statusBarColors.visual": "#5f00af",
        "vim.handleKeys": {
            "<C-f>": false,
            "<C-p>": false,
        },
        "[python]": {
            "editor.formatOnType": true
        },
        "workbench.editorLargeFileConfirmation": 40,
        "editor.fontSize": 18,
        "workbench.panel.opensMaximized": "always",
        "remote.SSH.defaultForwardedPorts": [

        
        ],
        "remote.SSH.suppressWindowsSshWarning": true,
        "remote.SSH.connectTimeout": 30,
        "workbench.colorTheme": "One Dark Pro Mix",
        
        //是否开启
	    "powermode.enabled": true,
	    //效果样式  "水花-particles", "烟花-fireworks", "火焰-flames", "雪花-magic", "幽灵-clippy", "激光-simple-rift", "大激光-exploding-rift"
	    "powermode.presets": "particles",
	    //时间间隔
	    "powermode.combo.timeout": 5,
	    //是否抖动
	    "powermode.shake.enabled": false,
	    //控制进度条显示位置 "编辑器-editor","状态栏-statusbar","关闭off"
	    "powermode.combo.location": "off",
	    //控制计数器是否可见 "显示-show","关闭-hide"
        "powermode.combo.counterEnabled": "hide",
        "update.mode": "none",
        "workbench.editor.enablePreview": false,
        "terminal.integrated.fontFamily": "JetBrainsMono",
        "terminal.integrated.enableMultiLinePasteWarning": false,
        "workbench.editor.wrapTabs": true
}
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值