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 "

}

}

相关推荐
csdn_aspnet1 天前
2026 年 9 款最佳开源 AI 编码助手及常见问题解答
vscode·continue·cline·goose·ai编码·aider·opencode
任逍遥20111 天前
免费!VS Code 行为树编辑器 micBT:行为树生成、编辑、推演、调试
vscode·行为树·vscode插件·micbt
拂拉氏1 天前
【知识讲解】 Linux中vim编辑器的学习与使用
linux·编辑器·vim
林三的日常1 天前
【无标题】
java·spring boot·vscode·调试·后端开发
Super 含1 天前
Android 包体积优化(一):APK 到底大在哪里?从 APK 结构到体积分析
android·ide·vscode
愚公搬代码1 天前
【愚公系列】《Web应用安全》005-Visual Studio Code编辑器的使用
前端·安全·编辑器
舞动青春881 天前
vscode copilot配置kimi k3
ide·vscode·copilot
浔川python社2 天前
浔川系列产品后台维护与漏洞修复公告
编辑器
golang学习记2 天前
VS Code 2026年的正确的打开方式
vscode
烂蜻蜓3 天前
Node.js入门教程(二十三):全局对象
node.js·编辑器·vim