first commit

This commit is contained in:
flykhan 2023-03-26 19:21:55 +08:00
commit 86c0a13245
3 changed files with 200 additions and 0 deletions

60
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,60 @@
// https://github.com/Microsoft/vscode-cpptools/blob/master/launch.md
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch", //
"type": "cppdbg", // cppdbgcpptoolscppdbg
"request": "launch", // launchattach
"program": "C:\\Windows\\system32\\cmd.exe", // (debug)
// "program": "${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe", // (debug)
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe", // (Windows'\\')
// "program": "${fileDirname}/${fileBasenameNoExtension}.exe", // (Linux'/')
"args": ["/C","${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe","&","pause"], //
// "args": [], //
"stopAtEntry": false, // truemain
"cwd": "${workspaceFolder}", // ${fileDirname}
"environment": [], //
"externalConsole": true, // true使cmdIDE1810falseVSC
// "externalConsole": false, // true使cmdIDE1810falseVSC
"internalConsoleOptions": "neverOpen", // neverOpengdb
"MIMode": "gdb", // gdblldblldb
"miDebuggerPath": "gdb.exe", // WindowsLinux
"setupCommands": [
{ // STLGoogle
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
],
"preLaunchTask": "Compile" // tasks.jsonlabel
},
{
"name": "(gdb) Debug", //
"type": "cppdbg", // cppdbgcpptoolscppdbg
"request": "launch", // launchattach
// "program": "C:\\Windows\\system32\\cmd.exe", // (debug)
"program": "${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe", // (debug)
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe", // (Windows'\\')
// "program": "${fileDirname}/${fileBasenameNoExtension}.exe", // (Linux'/')
// "args": ["/C","${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe","&","pause"], //
"args": [], //
"stopAtEntry": false, // truemain
"cwd": "${workspaceFolder}", // ${fileDirname}
"environment": [], //
// "externalConsole": true, // true使cmdIDE1810falseVSC
"externalConsole": false, // true使cmdIDE1810falseVSC
"internalConsoleOptions": "neverOpen", // neverOpengdb
"MIMode": "gdb", // gdblldblldb
"miDebuggerPath": "gdb.exe", // WindowsLinux
"setupCommands": [
{ // STLGoogle
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
],
"preLaunchTask": "Compile" // tasks.jsonlabel
}
]
}

109
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,109 @@
{
"workbench.sideBar.location": "left",
"window.title": "${dirty}${activeEditorLong}${separator}${rootName}${separator}${appName}",
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?·~!¥…()—【】、;:‘’“”,。《》? ",
"files.defaultLanguage": "c++", // ctrl+N
"editor.formatOnType": false, // C/C++
"editor.suggest.snippetsPreventQuickSuggestions": true, // clangdsnippetsIntellisense
"editor.acceptSuggestionOnEnter": "off", // tabIntellisense
"editor.snippetSuggestions": "inline", // snippetsinline
"C_Cpp.clang_format_sortIncludes": true, // include
"C_Cpp.autocomplete": "default", // cpptoolsclangd
"C_Cpp.suggestSnippets": true, //
"editor.fontFamily": "JetBrains Mono",
"editor.fontSize": 17, //
"editor.fontLigatures": true, // https://typeof.net/Iosevka
"editor.minimap.enabled": false, // minimap西
"editor.dragAndDrop": false, //
"editor.cursorSmoothCaretAnimation": "on", //
"editor.smoothScrolling": false, //
"files.trimTrailingWhitespace": true, //
"files.insertFinalNewline": true, // Linux
"files.autoGuessEncoding": true, // 6
"workbench.settings.useSplitJSON": false, //
"window.zoomLevel": 0, //
"git.enabled": true, // git
"git.ignoreMissingGitWarning": true, //
"[c]": {
"files.encoding": "utf8" // gbkcpp
},
"[c++]": {
"files.encoding": "utf8" // gbkcpp
},
"files.associations": {
"iostream": "cpp",
"algorithm": "cpp",
"*.tcc": "cpp",
"random": "cpp",
"fstream": "cpp",
"istream": "cpp",
"ostream": "cpp",
"regex": "cpp",
"utility": "cpp",
"array": "cpp",
"atomic": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"cfenv": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cuchar": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"functional": "cpp",
"iterator": "cpp",
"map": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ratio": "cpp",
"set": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"scoped_allocator": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"queue": "cpp"
},
"C_Cpp.errorSquiggles": "Enabled",
}

31
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,31 @@
// https://code.visualstudio.com/docs/editor/tasks
{
"version": "2.0.0",
"tasks": [{
"label": "Compile", // launch.jsonpreLaunchTask
"command": "g++", // 使C++g++
"args": [
"${file}",
"-o", // a.exeLinuxa.out
// "${fileDirname}/${fileBasenameNoExtension}.exe",
"${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe", // debug
"-g", //
"-Wall", //
"-static-libgcc", // libgcc
"-fexec-charset=utf-8", // 使GBKWin
// "-std=c11", // C++c++17
], // VSC西
"type": "process", // processvsccommandshellshellargsshell
"group": {
"kind": "build",
"isDefault": true // truectrl shift B
},
"presentation": {
"echo": true,
"reveal": "always", // alwayssilentneverVSC
"focus": false, // true使taskC/C++true
"panel": "shared" //
},
"problemMatcher":"$gcc" // Lint
}]
}