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

mac系统vsCode中使用Better Comments在.vue文件里失效

问题:关于Better Comments默认在html、TS、JS中有效,在vue中无效,需要单独进行配置

windows系统可以参考友链Better Comments(注释高亮)在vue文件里失效的问题

关于Better Comments电脑的配置路径:

Windows系统:C:\Users\你的用户名.vscode\extensions -> aaron-bond.better-comments-版本号 -> out -> parser.js
macOS系统:/Users/你的用户名/.vscode/extensions -> aaron-bond.better-comments-版本号 -> out -> parser.js

详细修改文件路径参考: .vscode -> .extensions -> aaron-bond.better-comments-版本号 -> out -> parser.js

以mac os系统为🌰:首先打开电脑自带终端(熟悉终端命令直接跳过按照详细路径一直进入到parser.js进行修改即可)

cd ~   //跳转到根目录
ls -a   //查看根目录下的 .vsCode
cd .vsCode // 效果如下图所示,按照上面提供的详细路径一路cd到parser.js文件即可

在这里插入图片描述
继续进入选中的目录,cd out //能够看到parser.js 可以直接拖拽到vsCode打开或者通过命令vim修改 效果如下图所示:
在这里插入图片描述
setDelimiter函数的switch中添加以下代码: 效果如下图所示:

case "vue":this.setCommentFormat("//", "/*", "*/")break;

在这里插入图片描述

最后一步:保存修改文件,关闭vsCode,重启即可在.vue文件中使用Better Comments来写注释内容

拓展:关于自己的Better Comments配置文件参考:可以复制直接使用或自定义即可

"better-comments.tags": [{"tag": "!!","color": "#FF2D00","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "todo","color": "#FF2D00","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "TODO","color": "#FF2D00","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "?","color": "#3498DB","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "、、","color": "#474747","strikethrough": true,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "!","color": "#FF8C00","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "info","color": "#CCFFFF","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "tip","color": "#CCFFFF","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "important","color": "#FFFFCC","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "example","color": "#FFFFCC","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "future","color": "#CCFFFF","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "未完成","color": "#FFFFCC","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "@","color": "#CCFFFF","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "test","color": "#FFFFCC","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "warn","color": "#FFFFCC","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "step","color": "#FFFFCC","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "^","color": "#FFFFCC","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "fail","color": "#FFFFCC","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false},{"tag": "***","color": "#98C379","strikethrough": false,"underline": false,"backgroundColor": "transparent","bold": false,"italic": false}],

http://www.mrgr.cn/news/81956.html

相关文章:

  • 吉林大学数据库应用程序开发期末真题2024/11/7
  • spring中使用@Validated,什么是JSR 303数据校验,spring boot中怎么使用数据校验
  • 表单元素(标签)有哪些?
  • 【Unity】 HTFramework框架(五十八)【进阶篇】资源及代码热更新实战演示(Deployment + HybridCLR)
  • 【刷题日记】455.分发饼干
  • LINUX 信号
  • (一)人工智能其实可以看成是一个函数
  • SOME/IP 协议详解——信息格式
  • Llama系列关键知识总结
  • 012-spring的注解开发、bean的属性、IOC实现原理
  • arcface
  • QT 学习第十四天 QWidget布局
  • SpringBoot对静态资源的映射规则
  • STM32-笔记20-测量按键按下时间
  • 计算机网络期末复习
  • C++ 设计模式
  • BUG分析 - 重启有时失败
  • 预计5.2.1版本的SharedingSphere Hint指定数据库未生效问题
  • 计算机网络500题2024-2025学年度第一学期复习题库(选择、判断、填空)
  • 前端项目 npm报错解决记录
  • ROUGE指标在自然语言处理中的应用:从理论到实践
  • 数字图像处理
  • C++算法知识点
  • sqlalchemy-access库操作MS Access
  • FFmpeg 4.3 音视频-多路H265监控录放C++开发二十一.4,SDP协议分析
  • 若依数据权限控制