代码编辑器哪个好用(电脑程序编程入门代码)
多条告白如次剧本只需引入一次
概括
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/e5a624b788d92b8d34d1392e4c4d9789406efe8f/VSCodeUserSetup-x64-1.51.1.exe
2、VSCODE安置
下图为确认安置进程,安置胜利后启用VSCode:
3、VSCode安置插件
Chinese (Simplified) Language Pack for Visual Studio Code(摆设表露谈话“zh-cn”)、
Vetur、stylelint、Sass、Prettier – Code formatter、GitLens–Git supercharged、ESLint、EditorConfig for VS Code、Debugger for Chrome、Debugger for Java、Code Runner、Auto Rename Tag
》》重启之后
4、自设置摆设
翻开文献->首要选择项->树立,就会加入到 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='30ce-e3d7-dbc2-50a6 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" }}