VSCode使用记录

一、安装

从官网 https://code.visualstudio.com 下载相应安装包

二、扩展:商店

  • Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code
  • Live Server
  • open in browser
  • GitLens --- Git supercharged
  • Remote - SSH
  • Prettier - Code formatter
  • ESLint
  • pxtorem
  • Vetur
  • Vue Language Features (Volar)
  • TypeScript Vue Plugin (Volar)

三、配置

1、切换语言

快捷键ctrl + shift + p搜索language,选择 configure display language,选择语言,重启


2、修改字体大小

快捷键ctrl + ,进入常用设置,编辑 Font Size

3、隐藏/显示缩略图

查看 -> 外观 -> 缩略图

4、连接远程服务器

快捷键ctrl + shift + p搜索connect to host,配置Hosts


5、vue2 快速构建模板

设置 -> 用户代码片段 -> 搜索vue.json,编辑保存


javascript 复制代码
{
	// 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": "vue2Init", 
		"body": [
			"/**",
			"*",
			"* Author: yourName",  
			"* CreatDate: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
			"*",
			"* Description: $0",
			"*",
			"*/",
			"<template>",
			"  <div class=\"$TM_FILENAME_BASE-wapper\">",
			"    <h1>$TM_FILENAME_BASE</h1>",
			"  </div>",
			"</template>",
			"",
			"<script>",
			"export default {",
			"  name: '$TM_FILENAME_BASE',",
			"  props: {},",
			"  components: {},",
			"  data() {",
			"    return {",
			"  ",
			"    }",
			"  },",
			"  mounted() {},",
			"  methods: {},",
			"  watch: {}",
			"}",
			"</script>",
			"",
			"<style lang='scss' scoped>",
			"  .$TM_FILENAME_BASE-wapper {",
			"     height:100%;",
			"  }",
			"</style>",
			""
		   ],
		"description": "vue2快速构建模板"
	},
	
	
}

输入vue.json配置prefix参数vue2Init 即可快速构建vue2模板

相关推荐
DO ITNOW1 小时前
Cursor/VScode ,点击运行按钮,就打开新的终端,如何设置为在当前终端运行文件而不是重新打开终端----一招搞定篇
ide·vscode·编辑器
小妖6661 小时前
若 VSCode 添加到文件夹内右键菜单中显示
ide·vscode·编辑器
就爱瞎逛1 小时前
TailWind CSS Intellisense 插件在VSCode 上不生效
前端·css·vscode·tailwind
freshman_y1 小时前
VSCode遇到的一些小毛病(自动保存、运行后光标不再处于编辑区)
ide·vscode·编辑器
youngqqcn5 小时前
VSCode-Copilot的系统提示词
ide·vscode·copilot
GBXLUO5 小时前
windows的vscode无法通过ssh连接ubuntu的解决办法
vscode·ubuntu
木头没有瓜6 小时前
idea离线安装插件
java·ide·intellij-idea
ncj3934379069 小时前
vscode中对node项目进行断点调试
vscode·node.js
古月居GYH15 小时前
【数据分析】如何在PyCharm中高效配置和使用SQL
ide·sql·pycharm
死也不注释18 小时前
【Unity 编辑器工具开发:GUILayout 与 EditorGUILayout 对比分析】
unity·编辑器·游戏引擎