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 "

}

}

相关推荐
lzj_pxxw1 天前
STM32移植FreeRTOS(Cmake+CubeMX)
vscode·stm32·嵌入式硬件
modelmd2 天前
离线安装与使用 vscode Remote SSH插件
ide·vscode·ssh
Ravenq~3 天前
无头转换:把 .docx 变成 PDF,不打开编辑器
pdf·编辑器
usdoc文档预览3 天前
USDOC系列之PPT文件在线编辑-VUE前端实现在线浏览器在线编辑PPT文档
前端·vue.js·编辑器·office365·ppt在线编辑·office文件在线编辑·文件在线编辑
寂寞的船4 天前
【Unity知识速递】第4期 MCP for Unity:用 AI 自然语言控制编辑器
人工智能·unity·编辑器
寂寞的船4 天前
【Unity知识速递】第6期 URP性能优化完全指南:从内存到GPU的三维调优
unity·性能优化·编辑器
浮尘笔记4 天前
JetBrains差异设置被自动勾选的排查与根治实录
经验分享·程序人生·编辑器·intellij idea·phpstorm·webstorm
Dream-Y.ocean5 天前
鸿蒙PC平台逻控 PLC 编辑器适配实战:基于 Electron 壳方案的纯 JavaScript 梯形图编程与仿真引擎开发
javascript·编辑器·harmonyos
NextTech_6 天前
不想学 vim,怎么改服务器上的配置文件?
服务器·编辑器·vim
ITKEY_7 天前
emacs 文件管理Dired, the Directory Editor
linux·编辑器·emacs