VSCode安装与配置
生活随笔
收集整理的這篇文章主要介紹了
VSCode安装与配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、首先需要下載VSCode,打開瀏覽器輸入https://code.visualstudio.com/(進入到官網),點擊下載,可以根據自己的操作系統進行下載。
2、下載成功后的本地exe安裝包:
3、默認安裝,下圖為確認安裝彈窗,點擊安裝即可,安裝成功后啟動VSCode:
4、VSCode安裝插件,安裝成功后需重啟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、Code Runner、Auto Rename Tag(暫時這些)
5、打開文件->首選項->設置,就會進入到 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
}
}
6、設置>用戶代碼片段
{
// 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"
}
}
總結
以上是生活随笔為你收集整理的VSCode安装与配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《金铲铲之战》S12换形术师阵容推荐
- 下一篇: 《最强祖师》逐出弟子专业技能返还方法-逐