码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • Highlight_Matching_Pair问题解决


    Highlight_Matching_Pair问题解决

    • 1 20_Highlight_Matching_Pair
      • 1.1 提示的问题
      • 1.2 出发问题出现的条件
        • 1.2.1 访问到“()”时会出现
        • 1.2.1 访问到不成对的“{}”时会出现
    • 2 解决办法
      • 2.1 首先确认matchparen.vim是否最新
      • 2.2 将vim更新到最新的版本

    1 20_Highlight_Matching_Pair

    当我们在用vim打开一些文件时,会经常遇到一下面Error detected while processing function 20_Highlight_Matching_Pair:的问题

    1.1 提示的问题

    Error detected while processing function <SNR>20_Highlight_Matching_Pair:
    line   72:
    E475: Invalid argument: 0
    Press ENTER or type command to continue
    
    • 1
    • 2
    • 3
    • 4

    1.2 出发问题出现的条件

    1.2.1 访问到“()”时会出现

      7  * Licensed under the Apache License, Version 2.0 (the "License"). You
      8  * may not reproduce, modify or distribute this software except in
      9  * compliance with the License. You may obtain a copy of the License
     10  * at: http://www.apache.org/licenses/LICENSE-2.0
    
    • 1
    • 2
    • 3
    • 4

    1.2.1 访问到不成对的“{}”时会出现

     26 /**
     27  * @file       xxx_main.c
     28  * @addtogroup xxx
     29  * @{
     30  */
    
    • 1
    • 2
    • 3
    • 4
    • 5

    2 解决办法

    当上网查看相关的词条时,可以看到有一条[https://github.com/vim/vim/issues/3280](https://github.com/vim/vim/issues/3280)描述了出现Error detected while processing function 39_Highlight_Matching_Pair: in bash file #3280时的解决办法,
    在这里插入图片描述

    2.1 首先确认matchparen.vim是否最新

    下面的这段解释就是让我们去检查matchparen.vim文件的时间戳,确认一下是否是最新的版本,

    Please make sure that the updated matchparen.vim script is loaded.
    If you execute vim without installing, old version of the script might be loaded.
    
    To check which file is loaded, you can use the :scriptnames command.
    
    Error detected while processing function <SNR>39_Highlight_Matching_Pair:
    
    The message says <SNR>39, so you should check the 39th scripts in the result of :scriptnames.
    If the Last Change date of the script is not 2018 Jul 3, your script is old.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    vim的matchparen.vim的最新版本(或者整个runtime的最新版本)可以去https://github.com/vim/vim/tree/01164a6546b4c635daf96a1f17d1cb2d07f32a66上去查看确认。

    2.2 将vim更新到最新的版本

    在ubuntu上更新vim版本的方法如下所示:

    sudo add-apt-repository ppa:jonathonf/vim
     
    sudo apt update
    
    sudo apt upgrade
     
    sudo apt install vim
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    通过上面的方法我解决了Error detected while processing function 20_Highlight_Matching_Pair:的问题,当我再打开存在非对称“{}”以及在注释中含有“()”的文件时不再报该问题。

  • 相关阅读:
    K8S云计算系列-(3)
    腾讯T9纯手写基于Mycat中间件的分布式数据库架构笔记
    使用frp进行内网穿透
    Linux常见指令
    【论文笔记】4D Millimeter-Wave Radar in Autonomous Driving: A Survey
    真Unity3D编辑器Editor二次开发
    EPOLL(C/S模型)实现I/O复用多进程聊天室,通过共享内存、socketpair实现父子进程通信,通过信号量回收进程
    Python 套接字编程完整指南
    【USRP】通信之有线通信
    网站在线监控工具Statping
  • 原文地址:https://blog.csdn.net/u014100559/article/details/128183792
  • 最新文章
  • 【JVM】编译执行与解释执行的区别是什么?JVM 使用哪种方式?
    用 Hashids 优雅解决 C 端自增 ID 暴露问题
    V8引擎 精品漫游指南--Ignition篇(上) 指令 栈帧 槽位 调用约定 内存布局 基础内容
    LLVM Pass快速入门(四):代码插桩
    milkup:桌面端 markdown AI续写和即时渲染
    基于项目工程构建SBOM(软件物料清单)的研究
    鸿蒙应用开发UI基础第二节:鸿蒙应用程序框架核心解析与实操
    .NET 中如何快速实现 List 集合去重?
    扣子Coze实战:从0到1打造抖音+小红书热点监控智能体
    浅谈数据访问层
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号