vscode console.log快捷键

在 Visual Studio Code 中,您可以使用快捷键「Ctrl + Shift + P」(Mac 用户请使用「Cmd + Shift + P」)打开命令面板,然后输入「Editor: Insert Console.log」即可快速插入「console.log」代码。此快捷键已内置于 Visual Studio Code 中,无需安装额外的插件。

配置文件

{

// Place your snippets for javascript 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:

// https://blog.csdn.net/ABB_818/article/details/124005658

"Print to log": {

"prefix": "log",

"body": [

"console.log('%c%s', 'color:#cb3a56', 'mingLog:--' + '$1');"

// "console.log('$1');",

"$2"

],

"description": "Log output to "

}

}

相关推荐
Gene_20221 天前
ubuntu22.04安装Claude Code及其在vscode跑通
ide·vscode·arcgis
计算机安禾1 天前
【Linux从入门到精通】第28篇:文本处理三剑客(中)——sed 流编辑器
linux·服务器·编辑器
#君君#1 天前
ros2 下VSCode 中显示波浪线(找不到定义)原因
ide·vscode·编辑器
芋头莎莎1 天前
ESP32 +VSCode与搭建开发环境教程
vscode·单片机
Codigger官方1 天前
2026年4月Vim生态最新官方消息
linux·编辑器·vim
HeeRiver2 天前
VSCode调用deepseek-v4-pro/flash api的方法
ide·vscode·api·deepseek-v4
H Journey2 天前
Windows + VSCode + CMake 编译
windows·vscode·cmake
三品吉他手会点灯2 天前
STM32 VSCode 开发-与STM32CubeMX协同开发环境搭建
vscode·stm32·单片机·嵌入式硬件
克拉拉KLARA2 天前
vscode禁用在git提交中插入ai coauthor copilot
git·vscode·copilot