environment
c/c++(every)
确保系统gcc g++ gdb环境
windows可以直接下载vs2019系列上安装c语言环境
linux
# redhat sudo yum update g++ --version gdb --version #如果没有就去下载 sudo yum install -y gcc g++ gdb # debain sudo apt-get update g++ --version gdb --version sudo apt-get install -y gcc g++ gdb
创建 c文件夹作为c语言工作区的根目录
如图 创建.vscode目录以及文件
launch.json
tasks.json
c_cpp_properties.json
确定gcc g++ gdb路径
gcc -v -E -x c++ -
修改“includePath”和“Path” 注意路径位置
c_cpp_properties.json
{ "configurations": [ { "name": "Win32", "includePath": [ "${workspaceRoot}", "d:/mingw/include/**", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include/c++", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include/c++/mingw32", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include/c++/backward", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../include", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include-fixed" ], "defines": [ "_DEBUG", "UNICODE", "__GNUC__=6", "__cdecl=__attribute__((__cdecl__))" ], "intelliSenseMode": "msvc-x64", "browse": { "limitSymbolsToIncludedHeaders": true, "databaseFilename": "", "path": [ "${workspaceRoot}", "d:/mingw/include/**", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include/c++", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include/c++/mingw32", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include/c++/backward", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../include", "d:/mingw/bin/../lib/gcc/mingw32/8.2.0/include-fixed" ] } } ], "version": 4 }
配置json(注意修改成你的路径)
lauch.json
{ "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", // 配置名称,将会在启动配置的下拉菜单中显示 "type": "cppdbg", // 配置类型,这里只能为cppdbg "request": "launch", // 请求配置类型,可以为launch(启动)或attach(附加) "program": "${workspaceFolder}/exe/${fileBasenameNoExtension}.exe",// 将要进行调试的程序的路径 "args": [], // 程序调试时传递给程序的命令行参数,一般设为空即可 "stopAtEntry": false, // 设为true时程序将暂停在程序入口处,一般设置为false "cwd": "${workspaceFolder}", // 调试程序时的工作目录,一般为${workspaceFolder}即代码所在目录 "environment": [], "externalConsole": true, // 调试时是否显示控制台窗口,一般设置为true显示控制台 "MIMode": "gdb", "miDebuggerPath": "D:/MinGW/bin/gdb.exe", // miDebugger的路径,注意这里要与MinGw的路径对应 "preLaunchTask": "g++", // 调试会话开始前执行的任务,一般为编译程序,c++为g++, c为gcc "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] }
tasks.json
{ "version": "2.0.0", "command": "g++", "args": [ "-g", "${file}", "-o", "${workspaceFolder}/exe/${fileBasenameNoExtension}.exe" ], // 编译命令参数 "problemMatcher": { "owner": "cpp", "fileLocation": [ "relative", "\\" ], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } } }
java
插件下载之后选择下载openjdk11
SpringBoot相关插件
字体颜色、界面颜色、快捷键模仿IDEA
python
Advanced setup
# 语法提示 cmd输入 pip install -i https://mirrors.aliyun.com/pypi/simple/ flake8 # settings.json文件 settings.json文件中输入"python.linting.flake8Enabled": true # 自动格式化代码 pip install -i https://mirrors.aliyun.com/pypi/simple/ yapf #settings.json "python.formatting.provider": "yapf"
自动补全功能
html/css/js
vscode-icons 图标集,资源管理器(前端东西太多 眼睛受不了)
HTML CSS Support(智能提示CSS类名以及id)
Live Server
(标准HTML页面浏览器自动刷新),修改默认的浏览器在插件的manage->extension settings->live server>custom browser-chrome(或其它)。
liver server的自动刷新配合vs code自动保存效果更好,修改vs code自动保存方法为:setting->commonly used->auto save修改为after delay,after delay默认1000毫秒,可修改。
javascript (es6) code snippets,javascript代码补全库。
open in browser,用于右键增强,使用浏览器打开html页面。
setting.json
取消此项的勾选
{ "files.associations": { "*.vue": "vue", "*.wpy": "vue", "*.wxml": "html", "*.wxss": "css" }, "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", "git.enableSmartCommit": true, "git.autofetch": true, "emmet.triggerExpansionOnTab": true, "emmet.showAbbreviationSuggestions": true, "emmet.showExpandedAbbreviation": "always", "emmet.includeLanguages": { "vue-html": "html", "vue": "html", "wpy": "html" }, //主题颜色 //"workbench.colorTheme": "Monokai", "git.confirmSync": false, "explorer.confirmDelete": false, "editor.fontSize": 14, "window.zoomLevel": 1, "editor.wordWrap": "on", "editor.detectIndentation": false, // 重新设定tabsize "editor.tabSize": 2, //失去焦点后自动保存 "files.autoSave": "onFocusChange", // #值设置为true时,每次保存的时候自动格式化; "editor.formatOnSave": false, //每120行就显示一条线 "editor.rulers": [ ], // 在使用搜索功能时,将这些文件夹/文件排除在外 "search.exclude": { "**/node_modules": true, "**/bower_components": true, "**/target": true, "**/logs": true, }, // 这些文件将不会显示在工作空间中 "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, "**/*.js": { "when": "$(basename).ts" //ts编译后生成的js文件将不会显示在工作空中 }, "**/node_modules": true }, // #让vue中的js按"prettier"格式进行格式化 "vetur.format.defaultFormatter.html": "js-beautify-html", "vetur.format.defaultFormatter.js": "prettier", "vetur.format.defaultFormatterOptions": { "js-beautify-html": { // #vue组件中html代码格式化样式 "wrap_attributes": "force-aligned", //也可以设置为“auto”,效果会不一样 "wrap_line_length": 200, "end_with_newline": false, "semi": false, "singleQuote": true }, "prettier": { "semi": false, "singleQuote": true } } }
c#
qt
github API
vscode 快捷键大全
这么多快捷键有用吗 屁用没有反正看不懂 (记住常用就好了 剩下的就当插眼 以后外一有用)
通用
按 Press | 按 Press |
Ctrl+Shift+P, F1 | 显示命令面板 |
Ctrl+P | 快速打开(文件) |
Ctrl+Shift+N | 新窗口/实例 |
Ctrl+Shift+W | 关闭窗口/实例 |
Ctrl+, | 打开用户设置 |
Ctrl+K+S | 键盘快捷键 |