vscode 快速打印console.log

编程入门 行业动态 更新时间:2024-10-28 19:22:37

vscode <a href=https://www.elefans.com/category/jswz/34/1771431.html style=快速打印console.log"/>

vscode 快速打印console.log

第一步

输入这些

{// Print Selected Variabl 为自定义快捷键中需要使用的name,可以自行修改"Print Selected Variable": {"body": ["\nconsole.log(","  '%c $CLIPBOARD: ',","  'background-color: #3756d4; padding: 4px 8px; border-radius: 2px; font-size: 14px; color: #fff; font-weight: 700;',","  $CLIPBOARD$1",")"],"description": "Print Selected Variable"}
}

第二步  设置快捷键

{"key": "z", // 自定义快捷键"command": "runCommands", // 运行多个命令"args": {"commands": [{"command": "editor.action.clipboardCopyAction" // 复制选中文本},{"command": "cursorEnd" // 光标移到最后},{"command": "editor.action.insertSnippet", // 插入片段"args": {"name": "Print Selected Variable" // 调用已配置的代码片段,这里是代码片段里定义的值}}]}
}

更多推荐

vscode 快速打印console.log

本文发布于:2023-11-15 01:46:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1591545.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:快速   vscode   log   console

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!