Sometimes when moving quickly through some code after saving or swapping buffers, this error occurs:
Error detected while processing function <SNR>29_Highlight_Matching_Pair:
line 140:
E801: ID already taken: 3
In runtime/plugin/matchparen.vim, s:Highlight_Matching_Pair() calls matchdelete(3) at the start of that function but that is skipped under certain conditions.
Some other plugin may call matachadd(..., 3) or :3match, and then matchparen.vim tries to use that hl id anyway.
This could be fixed by storing the next available hl id in w:paren_hl_on instead of always using 3, then matchdelete(w:paren_hl_on).
Sometimes when moving quickly through some code after saving or swapping buffers, this error occurs:
In
runtime/plugin/matchparen.vim,s:Highlight_Matching_Pair()callsmatchdelete(3)at the start of that function but that is skipped under certain conditions.Some other plugin may call
matachadd(..., 3)or:3match, and then matchparen.vim tries to use that hl id anyway.This could be fixed by storing the next available hl id in
w:paren_hl_oninstead of always using 3, thenmatchdelete(w:paren_hl_on).