给文件提添加高亮信息

news/2025/3/19 0:36:51/

给文件提添加高亮信息

因为在查看log的时候需要人工校验标签,因此萌生了用插件高亮标签方便查看的想法。

效果展示:

image.png

设备:VScode

设置步骤

  1. 下载Highlight插件

    image.png

  2. 点击管理→设置→在setting.json中编辑

    PixPin_2025-03-17_11-32-39.gif

  3. 添加以下内容

            "(<\\/?think>)" : { // 把 think 改成你想要高亮的标签"filterLanguageRegex": "log", // 仅作用于log文件(vscode右下角的文件类型)"decorations": [{ // 标签本身的高亮样式"overviewRulerColor": "#4f04ff",    // 概览标尺颜色,即右侧的小条"backgroundColor": "#fa5757f7",     // 背景色"color": "#e1ff00",         // 字体颜色"fontWeight": "bold",          // 字体加粗}]},"(<\\/?answer>)" : {"filterLanguageRegex": "log", // 仅作用于log文件(vscode右下角的文件类型)"decorations": [{ // 标签本身的高亮样式"overviewRulerColor": "#00C853","backgroundColor": "#00C85340","border": "#00C853","color": "#1f1f1f","fontWeight": "bold"}]},
    

    效果应该是:

    image.png

  4. 创建一个log文件进行验证

    The greatest integer value of \( b \) that satisfies this inequality is 5. Therefore, the greatest integer value of \( b \) for which the expression \(\frac{9x^3+4x^2+11x+7}{x^2+bx+8}\) has a domain of all real numbers is \( 5 \).<think>
    1. We analyzed the given expression \(\frac{9x^3+4x^2+11x+7}{x^2+bx+8}\) and determined that the domain is all real numbers if the denominator \(x^2 + bx + 8\) is never zero.
    2. For the denominator to have no real roots, the quadratic equation \(x^2 + bx + 8 = 0\) must have a negative discriminant.
    3. We calculated the discriminant \(\Delta = b^2 - 32\) and set it to be less than zero.
    4. Solving \(b^2 < 32\) for \(b\) gave us the interval \(-\sqrt{32} < b < \sqrt{32}\).
    5. We approximated \(\sqrt{32} \approx 5.656\) to find the integer bounds.
    </think>
    <answer>5</answer>
    

    image.png


http://www.ppmy.cn/news/1580193.html

相关文章

Android手机中各类安全相关知识总结

更多内容请见: 爬虫和逆向教程-专栏介绍和目录 文章目录 1. Android 安全威胁2. Android 安全防护措施3. Android 安全建议和最佳实践4. Android 安全工具推荐5. Android 安全常见问题5.1 如何检测设备是否感染恶意软件?5.2 如何防止应用滥用权限?5.3 如何保护设备免受网络攻…

在 Qt 中自定义控件样式:使用 QProxyStyle 代理和修改绘制元素

文章目录 在 Qt 中自定义控件样式&#xff1a;使用 QProxyStyle 代理和修改绘制元素1. 什么是 QProxyStyle&#xff1f;QStyle 和 QProxyStyle何时使用 QProxyStyle&#xff1f;关键方法&#xff1a;drawPrimitive() 2. drawPrimitive() 方法详解参数解析1. PrimitiveElement e…

单元测试、系统测试、集成测试、回归测试的步骤、优点、缺点、注意点梳理说明

单元测试、系统测试、集成测试、回归测试的梳理说明 单元测试 步骤&#xff1a; 编写测试用例&#xff0c;覆盖代码的各个分支和边界条件。使用测试框架&#xff08;如JUnit、NUnit&#xff09;执行测试。检查测试结果&#xff0c;确保代码按预期运行。修复发现的缺陷并重新测…

【解决】XCode不支持旧版本的iOS设备

办法&#xff1a; 手动添加设备支持文件&#xff08;暂时解决方式&#xff09; 如果您无法立即升级 Xcode&#xff0c;也可以通过下载设备支持文件来暂时解决问题。 检查当前设备的 iOS 版本&#xff1a; 连接设备到 Mac&#xff0c;打开 Xcode 查看提示的 iOS 版本。例如&…

Vue中使用到的padStart方法是什么

padStart() 是 JavaScript 字符串对象的一个方法&#xff0c;用于在字符串的开头填充指定的字符&#xff0c;直到字符串达到指定的长度。这在需要对字符串进行格式化&#xff0c;使其保持固定长度时非常有用&#xff0c;比如在日期格式化时&#xff0c;确保月份、日期等为两位数…

【Linux】设置系统时间

1、使用命令设置时间 1)date -s 常用格式: date -s “yyyyMMdd hh:mm:ss” date -s “yyyy-MM-dd hh:mm:ss”2)hwclock 两个选项 -s, --hctosys set the system time from the RTC -w, --systohc set the RTC from the system timehwclock -s:将系统时间设…

在事上练工作和生活的边界感

最近几个工作日醒得比较早&#xff0c;经常 5 点左右就醒了&#xff0c;一直想工作上的事&#xff0c;但无关焦虑&#xff0c;也不是啥耗费精力的破事儿&#xff0c;而是想用户价格缓存快速止损的方案。 设计方案时会考虑如何防资损&#xff0c;但如果就是没防住&#xff0c;发…

初识linux(16) 动静态库(手搓动静态库!)

目录 前导回顾 1. 手搓静态库 step1 编译获得同名.o文件 step2 ar -rc指令建立库 step3 将库安装到对应的路径下去 安装方法1&#xff1a;先将头文件都装到 /usr/include 路径下&#xff0c;再将库文件装到/lib64/ 路径下。 安装方法2&#xff1a;不安装到系统&#xff…