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模板

相关推荐
Linux运维技术栈6 小时前
Vim 命令大全:从入门到精通
linux·编辑器·vim
晨曦backend6 小时前
Vim 撤销 / 重做 / 操作历史命令汇总
linux·编辑器·vim
奋斗者1号6 小时前
Cursor 编辑器中的 Notepad 功能使用指南
编辑器·notepad++
晨曦backend6 小时前
Vim 插件管理:MiniBufExplorer 使用指南
linux·编辑器·vim
Thomas_YXQ13 小时前
Unity3D SM节点式动画技能编辑器实现
开发语言·游戏·unity·编辑器·游戏引擎
fydw_71513 小时前
Jinja2 模板在 Python 和 LLM 提示词编辑器中的应用
开发语言·python·编辑器
Fighting_199713 小时前
VSCode占C盘内存太大,如何处理
c语言·ide·vscode
潇-xiao15 小时前
vim的相关命令 + 三种模式(10)
linux·编辑器·vim
程序猿小D15 小时前
第28节 Node.js 文件系统
服务器·前端·javascript·vscode·node.js·编辑器·vim
kooboo china.18 小时前
什么是JSON ?从核心语法到编辑器
javascript·编辑器·json