To: vim-dev@vim.org Subject: Patch 6.1b.020 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1b.020 Problem: When using the matchit plugin, "%" finds a match on the "end" of a ":syntax region" command in Vim scripts. Solution: Skip over ":syntax region" commands by setting b:match_skip. Files: runtime/ftplugin/vim.vim *** ../vim61b.019/runtime/ftplugin/vim.vim Mon Sep 17 10:10:37 2001 --- runtime/ftplugin/vim.vim Thu Mar 14 20:05:54 2002 *************** *** 1,7 **** " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar ! " Last Change: 2001 Sep 17 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") --- 1,7 ---- " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar ! " Last Change: 2002 Mar 14 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") *************** *** 25,36 **** " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") ! let b:match_ignorecase=0 ! let b:match_words= \ '\:\:\,' . \ '\:\:\:\,' . \ '\:\:\,' . \ '\\)\@!\S:\,' . \ '(:)' endif --- 25,39 ---- " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") ! let b:match_ignorecase = 0 ! let b:match_words = \ '\:\:\,' . \ '\:\:\:\,' . \ '\:\:\,' . \ '\\)\@!\S:\,' . \ '(:)' + " Ignore ":syntax region" commands, the 'end' argument clobbers if-endif + let b:match_skip = 'getline(".") =~ "^\\s*sy\\%[ntax]\\s\\+region" || + \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"' endif *** ../vim61b.019/src/version.c Sat Mar 16 13:52:08 2002 --- src/version.c Sat Mar 16 14:34:25 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 20, /**/ -- 5 out of 4 people have trouble with fractions. /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///