vscode怎么运行代码(vscode怎么运行代码)

摘要Visual Studio Code(简称VS Code/VSC)是一款免费开源的现代轻量级代码编辑器,支持几乎所有主流开发语言的语法高亮、智能代码补全、自

摘要

Visual Studio Code(简称VS Code/VSC)是一款免费开源的现代轻量级代码编辑器,支持几乎所有主流开发语言的语法高亮、智能代码补全、自定义热键、括号匹配、代码片段、代码比较Diff、GIT等功能,支持插件扩展,并针对网页开发和云应用开发进行了优化。该软件支持跨平台的Win、Mac和Linux。

Vscode官网:https://code.visualstudio.com/

1.下载VSCode

打开浏览器输入https://code.visualstudio.com/(进入官网),点击下载,根据自己的操作系统下载即可。

下载地址:https://vscode.cdn.azure.cn/stable/e5a624b 788d 92 b 8d 34d 1392 E4 C4 d 9789406 efe8f/vscodeusersetup-x64-1 . 51 . 1 . exe

分享一款代码编辑器——vscode安装部署及配置教程

2.安装VSCODE

要确认下图中的安装过程,请在成功安装后启动VSCode:

分享一款代码编辑器——vscode安装部署及配置教程

分享一款代码编辑器——vscode安装部署及配置教程

分享一款代码编辑器——vscode安装部署及配置教程

分享一款代码编辑器——vscode安装部署及配置教程

分享一款代码编辑器——vscode安装部署及配置教程

分享一款代码编辑器——vscode安装部署及配置教程

3.VSCode安装插件

visual studio代码的中文(简体)语言包(配置显示语言“zh-cn”),

Vetur、stylelint、Sass、beauty-Code formatter、GitLens - Git supercharged、ESLint、VS代码的EditorConfig、Chrome的调试器、Java的调试器、Code Runner、自动重命名标签

分享一款代码编辑器——vscode安装部署及配置教程

“重启后,

分享一款代码编辑器——vscode安装部署及配置教程

4.自定义配置

打开文件-& gt;首选项-& gt;设置,它会进入settings.json文件。以下是自定义配置:

{ "git.confirmSync": false, "git.autofetch": true, "git.checkoutType": "remote", "git.enableSmartCommit": true, "files.autoSave": "onFocusChange", "files.associations": { "*.vue": "vue", "*.wpy": "vue", "*.wxml": "wxml", "*.wxss": "css", "*.js": "javascript", "*.html": "html", "*.cjson": "jsonc", "*.wxs": "javascript" }, "emmet.syntaxProfiles": { "vue-html": "html", "vue": "html" }, "emmet.includeLanguages": { "wxml": "html" }, "eslint.autoFixOnSave": true, "eslint.validate": [ "javascript", "javascriptreact", { "language": "html", "autoFix": true }, { "language": "vue", "autoFix": true }, { "autoFix": true, "language": "javascript" }, { "autoFix": true, "language": "javascriptreact" }, { "autoFix": true, "language": "typescript" }, { "autoFix": true, "language": "typescriptreact" } ], "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", "window.zoomLevel": 1, "explorer.confirmDelete": false, "vetur.experimental.templateInterpolationService": false, "editor.tabSize": 4, "editor.tabCompletion": "on", "editor.codeActionsOnSave": { "source.fixAll": true }}

5.设置>:用户代码片段

{ // Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected. // Example: "Print to console": { "prefix": "log", "body": [ "console.log('$1')", "$2" ], "description": "Log output to console" }, "Print to vue template": { "prefix": "vue", "body": [ "<template>", " <div class='page-view'>", " 1", " </div>", "</template>", " ", "<script lang='ts'>", "import Vue from 'vue'", "export default Vue.extend({", " data() {", " return{}", " },", " methods:{}", "});", "</script>", " ", "<style lang='scss' scoped>", ".page-view {", " min-height: 100%;", "}", "</style>" ], "description": "Log output to vue template" }}

后面会分享更多关于devops和DBA的内容,感兴趣的朋友可以关注一下~

分享一款代码编辑器——vscode安装部署及配置教程

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。

作者:美站资讯,如若转载,请注明出处:https://www.meizw.com/n/162846.html

发表回复

登录后才能评论