Hi,

Recent version of matchit.vim respects 'matchpairs', so we don't need to
append &matchpairs to b:match_words in ftplugins.  It generates duplicated
patterns in matchit.vim.

Another problem is that '[', ']' and some other characters should be escaped
by '\' when they are used in b:match_words. So appending &matchpairs to 
b:match_words without escaping causes problems. (E.g. ]% doesn't work.)

Please check the attached patch.  Also including a patch to options.txt.

Actually this is not a problem only in c.vim.  The following plugins
might be also affected:
    clojure.vim
    dtrace.vim
    sql.vim
    zsh.vim

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  8972105467474f7d1de65f2b12005046cf17dc79

diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5138,7 +5138,7 @@ A jump table for the options with a shor
 		:au FileType c,cpp,java set mps+==:;
 
 <	For a more advanced way of using "%", see the matchit.vim plugin in
-	the $VIMRUNTIME/macros directory. |add-local-help|
+	the $VIMRUNTIME/pack/dist/opt/matchit directory. |add-local-help|
 
 						*'matchtime'* *'mat'*
 'matchtime' 'mat'	number	(default 5)
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -36,7 +36,7 @@ endif
 
 " When the matchit plugin is loaded, this makes the % command skip parens and
 " braces in comments.
-let b:match_words = &matchpairs . ',^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
+let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
 let b:match_skip = 's:comment\|string\|character\|special'
 
 " Win32 can filter files in the browse dialog

Raspunde prin e-mail lui