Hi, ensure to have sourced the matchit plugin and then open CONTRIBUTING.md file in Vim source tree, and go to this line :
[on the Vim website]: http://www.vim.org/maillist.php#vim-dev :10 Now press % on the first '[' bracket. Note, it will jump to the corresponding closing bracket. Press '%' again and note, that the cursor did not jump. This happens because in the matchit plugin, the regex is cached incorrectly. This patch fixes it: diff --git a/runtime/macros/matchit.vim b/runtime/macros/matchit.vim index 70867b1..59a8bee 100644 --- a/runtime/macros/matchit.vim +++ b/runtime/macros/matchit.vim @@ -122,7 +122,6 @@ function! s:Match_wrapper(word, forward, mode) range " Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion! if (match_words != s:last_words) || (&mps != s:last_mps) || \ exists("b:match_debug") - let s:last_words = match_words let s:last_mps = &mps " The next several lines were here before " BF started messing with this script. @@ -141,6 +140,7 @@ function! s:Match_wrapper(word, forward, mode) range let s:do_BR = 1 let s:pat = s:ParseWords(match_words) endif + let s:last_words = match_words let s:all = substitute(s:pat, s:notslash . '\zs[,:]\+', '\\|', 'g') let s:all = '\%(' . s:all . '\)' " let s:all = '\%(' . substitute(s:all, '\\\ze[,:]', '', 'g') . '\)' CC'ing Benji Fisher as maintainer. Not sure, if he reads his mail. Best, Christian -- Man spricht vergebens viel, um zu versagen; Der andre hört von allem nur das Nein. -- Johann Wolfgang von Goethe (Iphigenie auf Tauris) -- -- 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.
