当前位置: 首页 > news >正文

VSCode常用快捷键和功能

格式化代码:

Shift+Alt+F

JS中自动输入console.log()的方法:

先在vscode中,找到文件 > 首选项 > 配置用户代码片段,在弹出的下拉框处方输入javascript.json,复制下面的代码,覆盖原来的代码,保存即可。

{// 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:"Print to console String": {"prefix": "csl","body": ["console.log($1)","$2"],"description": "Log output to console"},"Print to console Var": {"prefix": "csls","body": ["console.log('$1')","$2"],"description": "Log output to console"}
}

http://www.lryc.cn/news/394768.html

相关文章:

  • 上海市计算机学会竞赛平台2023年2月月赛丙组平分数字(一)
  • Qwen1.5-1.8b部署
  • 关于7月1号centos官方停止维护7系列版本导致centos7+版本的机器yum等命令无法使用的解决教程
  • 2024人工智能大会_强化学习论坛相关记录
  • Android SurfaceFlinger——创建EGLContext(二十五)
  • python 10个自动化脚本
  • 填报高考志愿,怎样正确地选择大学专业?
  • Java 使用sql查询mongodb
  • WIN32核心编程 - 线程操作(二) 同步互斥
  • web自动化(六)unittest 四大组件实战(京东登录搜索加入购物车)
  • 鸿蒙语言基础类库:【@ohos.process (获取进程相关的信息)】
  • 华为笔试题
  • 【MySQL基础篇】函数及约束
  • YOLOv9报错:AttributeError: ‘list‘ object has no attribute ‘view‘
  • Bert入门-使用BERT(transformers库)对推特灾难文本二分类
  • 【DFS(深度优先搜索)详解】看这一篇就够啦
  • java-spring boot光速入门教程(超详细!!)
  • 一、Prometheus和Grafana搭建
  • 从零开始的python学习生活
  • MSP学习
  • 生产力工具|Endnote X9如何自动更新文件信息
  • 【python】字典、列表、集合综合练习
  • 超融合服务器挂载硬盘--linux系统
  • Kafka如何防止消息重复发送
  • 数据库设计原则介绍
  • 反馈神经网络与不同类型的神经网络:BP神经网络,深度感知机,CNN,LSTM
  • 轮播图案例
  • Spring 泛型依赖注入
  • C++ Linux调试(无IDE)
  • FFmpeg——视频拼接总结