文章目录
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"
},
}