On Mo, 29 Jun 2020, Charles Campbell wrote:

> Hello, Christian:
> 
> I see that you've picked up maintaining the matchit plugin.  I've been
> having problems with it recently -- problems that I didn't used to have.
> 
> * I used to be able to use the % key, in vimscript, to jump between if ..
> elseif ..endif
> * I used to be able to bypass {{{3 in comments and still matchit-jump
> between matching {...}s.
> 
> To do these things I have in .vim/after/ftplugin, for vim:
> 
>    " Custom MatchIt Support: {{{1
>    let b:match_words=
>    
> '\<fu\%[nction]\>:\<retu\%[rn]\>:\<endf\%[unction]\>,\<wh\%[ile]\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<endw\%[hile]\>,\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,(:),\<for\>:\<endfor\=\>'
> 
> 
> In .vim/ftplugin/c I have, for c:
> 
> " Custom Matchit Support: {{{1
> let b:match_words=
>    \ '\%(\<else\s\+\)\@<!\<if\>:\<else\s\+if\>:\<else\%(\s\+if\)\@!\>,' .
>    \ '\<switch\>:\<case\>:\<default\>,'.
>    \ &matchpairs
> 
> and in .vim/ftplugin/syntax/c I have, for c:
> 
>    syn match    cFolding            "{{{\d\+" containedin=cComment
>    syn match    cFolding            "}}}\d\+" containedin=cComment
> 
>    " modify matchit to exclude matching {}s and whatnot inside ChipDbg
>    strings
>    let b:match_skip='synIDattr(synID(line("."),col("."),1),"name") =~?
>    "cComment\\|character\\|special\\|ChipDbg\\|cFolding"'
> 
> I verified this by not seeing the desired behavior with the current matchit
> and verifying that did work properly with the old matchit. For now, I'm
> using the Benji F's matchit...

Hm, for me it works without problems with the default b:match_words from 
$VIM/ftplugin/vim.vim

Can you provide a reproducible example of what does not work, I'll have 
a closer look then, thanks!


Mit freundlichen Grüßen
Christian
-- 
So viel Geld läßt sich, weiß Gott, nicht mit etwas Gutem verdienen.
                -- Friedrich Schiller (Kabale und Liebe)

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20200701070155.GD2640%40256bit.org.

Raspunde prin e-mail lui