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

相关推荐
科研小白_d.s10 小时前
vscode配置c/c++环境
c语言·c++·vscode
程序猿进阶17 小时前
如何在 Visual Studio Code 中反编译具有正确行号的 Java 类?
java·ide·vscode·算法·面试·职场和发展·架构
猿饵块17 小时前
vscode
ide·vscode·编辑器
(⊙o⊙)~哦20 小时前
vim的 配置文件
linux·编辑器·vim
大数据界Olu21 小时前
bug | pycharm社区版无sciview解决办法
ide·python·pycharm
卡兰芙的微笑21 小时前
get_property --Cmakelist之中
前端·数据库·编辑器
千寻简1 天前
Cursor免费 GPT-4 IDE 工具的保姆级使用教程
java·运维·ide·ai
我是一颗小小的螺丝钉1 天前
idea插件推荐之Cool Request
java·ide·intellij-idea
我命由我123451 天前
2.使用 VSCode 过程中的英语积累 - Edit 菜单(每一次重点积累 5 个单词)
前端·javascript·ide·vscode·学习·编辑器·学习方法
疑惑的杰瑞2 天前
[乱码]确保命令行窗口与主流集成开发环境(IDE)统一采用UTF-8编码,以规避乱码问题
java·c++·vscode·python·eclipse·sublime text·visual studio