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

相关推荐
拼图2091 天前
VSCode 正则表达式使用指南
ide·vscode·正则表达式
#六脉神剑2 天前
myBuilder 11 月新版本:AI辅助设计
ide·人工智能·低代码·ai·mybuilder
小李不困还能学2 天前
VSCode_RemoteSSH_一直卡在下载服务器_解决教程
服务器·ide·vscode
caoliaoerweima2 天前
草料二维码小程序上线活码编辑器:手机上也能编辑活码了
智能手机·小程序·编辑器·草料二维码
慧都产品智能化3 天前
Qt 表格升级攻略:复用已有编辑器,减少重复开发
c++·qt·编辑器·qt6.3
独隅3 天前
WebStorm macOS 安装部署与高效调优完全指南
ide·macos·webstorm
独隅3 天前
WebStorm macOS 安装调优与实战效能全景
ide·macos·webstorm
DFT计算杂谈3 天前
可DIY布里渊区图像绘制编辑器
人工智能·机器学习·语言模型·矩阵·编辑器
独隅4 天前
WebStorm Linux 版安装实战与核心效能展示
linux·ide·webstorm
lzj_pxxw5 天前
STM32移植FreeRTOS(Cmake+CubeMX)
vscode·stm32·嵌入式硬件