自用的vscode的json设置

launch.json (for C++)

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "g++.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/untitled.exe",
            // "program": "${workspaceFolder}/build_debug/untitled.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:/Users/xd15zhn/Documents/mingw64/bin/gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            // "preLaunchTask": "lblmake"
        }
    ]
}

launch.json (for python)

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/main.py",
            "console": "integratedTerminal",
            "justMyCode": true
        }
    ]
}

tasks.json(for C++)

{
	"version": "2.0.0",
	"options": {
		// "cwd": "${workspaceFolder}/build_test"
		// "cwd": "${workspaceFolder}/build_debug"
		"cwd": "${workspaceFolder}/build"
	},
	"tasks": [
        {
            "label": "lblcmake",
            "command": "cmake",
            "args": [
                "..",
                "-G",
                "MinGW Makefiles"
            ],
            "problemMatcher": []
        },
        {
            "label": "lblmake",
            "command": "mingw32-make",
            "args": [],
            "problemMatcher": []
        },
        {
            "label": "lblrun",
            "command": "./untitled.exe",
            "args": [],
            "problemMatcher": []
        },
        {
            "label": "BuildAndRun",
            "dependsOrder": "sequence",
            "dependsOn": [
                "lblmake",
                "lblrun"
            ],
            "problemMatcher": [],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

tasks.json(for latex)

{
	"version": "2.0.0",
	"options": {
		"cwd": "${workspaceFolder}"
	},
	"tasks": [
        {
            "label": "lblxelatextotal",
            "command": "xelatex",
            "args": [
                "-jobname=doctorreport",
                "-output-directory=build_total",
                "main.tex"
            ],
            "problemMatcher": []
        },
        {
            "label": "lblxelatexpart",
            "command": "xelatex",
            "args": [
                "-jobname=report",
                // "-interaction=batchmode",
                "-output-directory=build_partial",
                "main.tex"
            ],
            "problemMatcher": []
        },
        {
            "label": "lblbibtextotal",
            "command": "bibtex",
            "args": ["build_total/doctorreport.aux"],
            "problemMatcher": []
        },
        {
            "label": "lblbibtexpart",
            "command": "bibtex",
            "args": ["build_partial/report.aux"],
            "problemMatcher": []
        },
        {
            "label": "BuildAndRun",
            "dependsOrder": "sequence",
            "dependsOn": [
                // "lblxelatextotal",
                // "lblbibtextotal",
                "lblxelatexpart",
                "lblbibtexpart",
            ],
            "problemMatcher": []
        }
    ]
}

tasks.json(for python)

{
	"version": "2.0.0",
	"options": {
	},
	"tasks": [
        {
            "label": "lblplot",
            "command": "python",
            "args": ["main.py"]
        },
        {
            "label": "BuildAndRun",
            "dependsOrder": "sequence",
            "dependsOn": [
                "lblplot"
            ],
        }
    ]
}

c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "C:/Users/xd15zhn/AppData/Local/Programs/Python/Python310/include",
                "C:/Users/xd15zhn/AppData/Local/Programs/Python/Python310/Lib/site-packages/numpy/core/include",
                "${workspaceFolder}/src",
                "C:/Users/xd15zhn/Documents/cpplibraries/include"
            ],
            "defines": [
                "_USE_MATH_DEFINES",
                "USE_ZHNMAT",
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.19041.0",
            "compilerPath": "C:/Users/xd15zhn/Documents/mingw64/bin/gcc.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-gcc-x64"
        }
    ],
    "version": 4
}

keybindings.json

[{
    "key": "F6",
    "command": "workbench.action.tasks.runTask",
    "args": "BuildAndRun"
},
{
    "key": "ctrl+shift+u",
    "command": "editor.action.transformToUppercase"
},
{
    "key": "ctrl+u",
    "command": "editor.action.transformToLowercase"
},
{
    "key": "ctrl+q",
    "command": "workbench.action.toggleSidebarVisibility"
},
{
    "key": "ctrl+b",
    "command": "-workbench.action.toggleSidebarVisibility"
},
{
    "key": "ctrl+q",
    "command": "-workbench.action.quickOpenNavigateNextInViewPicker",
    "when": "inQuickOpen && inViewsPicker"
},
{
    "key": "ctrl+shift+q",
    "command": "-workbench.action.quickOpenNavigatePreviousInViewPicker",
    "when": "inQuickOpen && inViewsPicker"
},
{
    "key": "ctrl+q",
    "command": "-workbench.action.quickOpenView"
},
{
    "key": "ctrl+r",
    "command": "-workbench.action.openRecent"
},
{
    "key": "ctrl+r",
    "command": "-workbench.action.reloadWindow",
    "when": "isDevelopment"
},
{
    "key": "ctrl+r",
    "command": "editor.action.insertSnippet"
},
{
    "key": "ctrl+r",
    "command": "-workbench.action.quickOpenNavigateNextInRecentFilesPicker",
    "when": "inQuickOpen && inRecentFilesPicker"
},
{
    "key": "ctrl+m",
    "command": "-editor.action.toggleTabFocusMode"
},
{
    "key": "ctrl+m",
    "command": "editor.action.toggleMinimap"
},
{
    "key": "ctrl+shift+v",
    "command": "markdown.showPreviewToSide",
    "when": "!notebookEditorFocused && editorLangId == 'markdown'"
},
{
    "key": "ctrl+k v",
    "command": "-markdown.showPreviewToSide",
    "when": "!notebookEditorFocused && editorLangId == 'markdown'"
}
]

User Snippets

markdown

{
	"aligned": {
		"prefix": "aligned",
		"body": [
			"$$\\begin{aligned}",
			"& $1 \\\\\\",
			"\\end{aligned}$$"
		],
		"description": "Insert aligned"
	},
}

latex

{
	"equation": {
		"prefix": "equation",
		"body": [
			"$$\\begin{equation}",
			"$1",
			"\\end{equation}$$"
		],
		"description": "Insert aligned"
	},
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值