vim Matchit's parentheses matching function breaks in tex files

Bug #2047926 reported by Geoff Adelbloom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
New
Undecided
Unassigned

Bug Description

** lsb_release -rd
Description: Ubuntu 22.04.3 LTS
Release: 22.04

**apt-cache policy vim
vim:
  Installed: 2:8.2.3995-1ubuntu2.15
  Candidate: 2:8.2.3995-1ubuntu2.15
  Version table:
 *** 2:8.2.3995-1ubuntu2.15 500
        500 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2:8.2.3995-1ubuntu2 500
        500 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

**The functionality of the package 'Matchit' that is shipped with vim 8.2 is broken for .tex files.

**Minimal example:
The file test.tex contains the following text:

(hello)

**Expected behavior: when the cursor is placed on the '(' character, a keyboard press of the '%' button should take the cursor to the ')' character.

**Faulty behavior: instead, an error message pops up, saying:

Error detected while processing function matchit#Match_wrapper[161]..<SNR>65_Par
seSkip:
line 10:
E488: Trailing characters: . strpart(skip,2). "'"
Error detected while processing function matchit#Match_wrapper:
line 174:
E121: Undefined variable: r
line 176:
E121: Undefined variable: r

**Possible solution: replace the file /usr/share/vim/vim82/pack/dist/opt/matchit/autoload/matchit.vim with the newest version of matchit.vim (commit 9c1c78e, https://github.com/chrisbra/matchit/blob/master/autoload/matchit.vim)

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: vim 2:8.2.3995-1ubuntu2.15
ProcVersionSignature: Ubuntu 5.15.0-91.101-generic 5.15.131
Uname: Linux 5.15.0-91-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Wed Jan 3 11:53:45 2024
DistributionChannelDescriptor:
 # This is the distribution channel descriptor for the OEM CDs
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-bionic-amd64-20180608-47+north-bay-14-15-15p+X56
InstallationDate: Installed on 2020-03-16 (1388 days ago)
InstallationMedia: Ubuntu 18.04 "Bionic" - Build amd64 LIVE Binary 20180608-09:38
SourcePackage: vim
UpgradeStatus: Upgraded to jammy on 2023-12-10 (23 days ago)

Revision history for this message
Geoff Adelbloom (geoff-adel) wrote :
summary: - matchit vim matching parentheses tex files
+ vim Matchit's parentheses matching function breaks in tex files
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.