vscode

vscode个人使用过程-仅供个人参考。

vscode代码提示-修改首行为abc的提示解决方法

问题描述:

比如console.log这个常用的打印代码

可是当使用后会发现一个问题,有一个abc的代码提示永远在第一行

解决方法:

vscode设置-->搜索栏输入editor.snippetSuggestions-->选择top

自定义代码片段流程

javascript 复制代码
{
	// 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:
	"晁阳测试": {
		"scope": "javascript,typescript",
		"prefix": "vv",
		"body": [
			"console.log('$1');",
			"$2"
		],
		"description": "Log output to console"
	}
}
Dart 复制代码
//放置您的全局 此处的片段。每个代码段都定义在一个代码段名称下,并具有范围、前缀、正文和描述在范围字段中添加代码段适用的语言的逗号分隔ID。
	//如果范围为空或被省略,则该片段将应用于所有语言。
    //前缀是什么用于触发摘录,并且正文将被展开和插入。可能的变量包括:
    //$1,$2用于制表位,$0用于最后的光标位置,${1:label},${2:other}用于占位符。
    //具有相同id的占位符是连接的。
相关推荐
kyriewen11 分钟前
我同时用了 Claude Code、Cursor 和 Codex,说说三个工具的真实差距——2026 年选错工具比不用 AI 更浪费时间
前端·ai编程·claude
Jackson__38 分钟前
为了拯救我的腰椎和颈椎,我做了款浏览器插件!
前端·javascript·开源
闲猫43 分钟前
Python FastAPI + SQLAlchemy 入门教程:从零搭建你的第一个 Web 应用
前端·python·fastapi
林小帅1 小时前
NestJS v11 + Prisma v7 ESM 迁移配置解析
前端·javascript·后端
IT_陈寒1 小时前
React的setState竟然不是立刻生效的,害我调试半天
前端·人工智能·后端
简简单单就是我_hehe1 小时前
前端埋点日志解决方案:完整 User-Agent 解析工具实现,爬虫识别、设备品牌、操作系统、浏览器版本全解析(附完整源码)
前端·爬虫
Funing72 小时前
FreeRTOS学习day1:Keil 工程配置与 FreeRTOS 链表机制理解
数据结构·学习·链表
心中有国也有家2 小时前
使用 DevEco Studio 配置 Flutter 鸿蒙签名
学习·flutter·华为·harmonyos
灯澜忆梦2 小时前
MySQL 完整学习路线
学习·mysql
William_Xu2 小时前
Vue 2 与 Vue 3 生命周期对比
前端