当前位置: 首页 > article >正文

VScode 配置用户片段

文件->首选项->配置用户片段->新建全局用户片段

后续就可以通过vv3来直接生成下面的代码

{
	// Place your 全局 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and 
	// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope 
	// is left empty or omitted, the snippet gets applied to all languages. 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": {
	// 	"scope": "javascript,typescript",
	// 	"prefix": "log",
	// 	"body": [
	// 		"console.log('$1');",
	// 		"$2"
	// 	],
	// 	"description": "Log output to console"
	// }


    "Print to console": {
        "prefix": "vv3",
        "body": [
            "<template>",
            "\t<div>",
            "\t</div>",
            "</template>",
            "<script lang=\"ts\">",
            "import { defineComponent } from 'vue'",
            "export default defineComponent({",
            "\tname:'App'",
            "})",
            "</script>",
        ],
        "description": "Log output to console"
    }
}

http://www.kler.cn/a/133462.html

相关文章:

  • Towards Reasoning in Large Language Models: A Survey
  • 【项目组件】第三方库——websocketpp
  • Vue计算属性computed
  • catchadmin-webman 宝塔 部署
  • 城市轨道交通数据可视化的应用与优势
  • SpringBoot(十八)SpringBoot集成Minio
  • 基于libcurl+libopenssl开源库编译出curl下载工具及代码集成curl功能
  • Linux QT交叉编译环境安装
  • Vite 启动默认只能访问localhost解决方法
  • 基于枚举实现的桥接模式
  • 物联网赋能:WIFI HaLow在无线连接中的优势
  • java 实现串口通讯
  • 将word中的表格无变形的弄进excel中
  • 论文阅读:JINA EMBEDDINGS: A Novel Set of High-Performance Sentence Embedding Models
  • 开发一款小程序游戏需要多少钱?
  • 【uniapp/uview1.x】u-upload 在 v-for 中的使用时, before-upload 如何传参
  • Redis7.2.3集群安装,新增节点,删除节点,分配哈希槽,常见问题
  • 【Linux】21、软中断、网络小包、SYN FLOOD 攻击、sar tcpdump
  • C语言-统计字符
  • 使用Golang调用摄像头
  • React新手必懂的知识点
  • Zabbix Proxy分布式监控
  • 大数据学习(22)-spark
  • C# WPF Threads 和 Dispatchers 有什么区别
  • 聊聊logback的MDCFilter
  • Java编程技巧:将图片导出成pdf文件