Bug#881654: vim: visible bracket matching broken in configure.ac files

James McCoy jamessan at debian.org
Sun Jan 28 21:25:08 UTC 2018


Hi Christian,

As described below, the highlighting performed by :MatchParen gets
confused by the AC_MSG_* syntax region.

On Mon, Nov 13, 2017 at 10:36:35PM +0100, Ferenc Wágner wrote:
> Please create /tmp/configure.ac with the following contents:
> 
> [AC_MSG_([yes])]
> 
> and position the cursor on the first character, the opening bracket.
> This highlights the first closing bracket, right after "yes", instead
> of the closing bracket at the end of the line.  However, hitting %
> correctly jumps to the end of the line.

":help pi_paren" explains the problem

> The syntax highlighting attributes are used.  When the cursor currently is not
> in a string or comment syntax item, then matches inside string and comment
> syntax items are ignored.  Any syntax items with "string" or "comment"
> somewhere in their name are considered string or comment items.

Since the opening ([ are highlighted as configstring, they aren't
considered a valid match for the closing ]).

Changing the syntax region's name to configmsg, like in the attached
patch, fixes the problem.  The contents are still highlighted like a
string, but it doesn't confuse the paren matching.

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.vim-matchparen.diff
Type: text/x-diff
Size: 1300 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20180128/06408ce8/attachment-0001.diff>


More information about the pkg-vim-maintainers mailing list