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 "

}

}

相关推荐
要加油哦~16 小时前
工具 | 解决 VSCode 中的 Delete CR 问题
ide·vscode·编辑器
taoismimortal1 天前
vscode目录,右键菜单加入用VSCode打开文件和文件夹(快速解决)(含删除)(脚本)
ide·vscode·编辑器
猫咪的白手套1 天前
解决VSCode中“#include错误,请更新includePath“问题
ide·vscode·编辑器
天安彩2 天前
mac下 vscode 运行 c++无法弹出窗口
c++·vscode·macos·clang
白日与明月2 天前
Hive-vscode-snippets
hive·hadoop·vscode
橘子味的茶二2 天前
vsCode如何远程服务器不需要每次输入密码
服务器·ide·vscode
鑫宇吖2 天前
IAR编辑器如何让左侧的工具栏显示出来?
编辑器·嵌入式·c·iar
咩咩觉主2 天前
Unity编辑器拓展 IMGUI与部分Utility知识总结(代码+思维导图)
unity·c#·编辑器·游戏引擎
William.csj2 天前
VSCode——python选择解释器消失的解决办法
vscode·编辑器
滴水成川2 天前
现代 C++ 开发工作流(VSCode / Cursor)
开发语言·c++·vscode·cursor