|
6 | 6 | " Eduardo Lopez (http://github.com/tapichu)
|
7 | 7 | " Arvid Bjurklint (http://github.com/slarwise)
|
8 | 8 | " Paweł Zacharek (http://github.com/subc2)
|
9 |
| -" Last Update: 2022-Sep-28 |
| 9 | +" Last Update: 2023-Dec-20 |
10 | 10 | " License: Vim license
|
11 | 11 | " URL: https://github.com/vim-erlang/vim-erlang-runtime
|
12 | 12 |
|
@@ -96,26 +96,22 @@ if !exists('*ErlangFoldText')
|
96 | 96 | endfunction
|
97 | 97 | endif
|
98 | 98 |
|
| 99 | +" The following lines enable the macros/matchit.vim plugin for extended |
| 100 | +" matching with the % key. |
| 101 | +let b:match_ignorecase = 0 |
| 102 | +let b:match_words = |
| 103 | + \ '\<\%(begin\|case\|fun\|if\|maybe\|receive\|try\)\>' . |
| 104 | + \ ':\<\%(after\|catch\|else\|of\)\>' . |
| 105 | + \ ':\<end\>,' . |
| 106 | + \ '^\l[A-Za-z0-9_@]*' . |
| 107 | + \ ':^\%(\%(\t\| \{' . shiftwidth() . |
| 108 | + \ '}\)\%([^\t\ %][^%]*\)\?\)\?;\s*\%(%.*\)\?$\|\.[\t\ %]\|\.$' |
| 109 | +let b:match_skip = 's:comment\|string\|erlangmodifier\|erlangquotedatom' |
| 110 | + |
99 | 111 | let b:undo_ftplugin = "setlocal keywordprg< foldmethod< foldexpr< foldtext<"
|
100 | 112 | \ . " comments< commentstring< formatoptions< suffixesadd< include<"
|
101 | 113 | \ . " define<"
|
102 |
| - |
103 |
| -" The following lines enable the macros/matchit.vim plugin for |
104 |
| -" extended matching with the % key. |
105 |
| -if exists("loaded_matchit") |
106 |
| - let s:sw = &sw |
107 |
| - if exists('*shiftwidth') |
108 |
| - let s:sw = shiftwidth() |
109 |
| - endif |
110 |
| - |
111 |
| - let b:match_words = |
112 |
| - \ '\<\%(begin\|case\|fun\|if\|maybe\|receive\|try\)\>' . |
113 |
| - \ ':\<\%(after\|catch\|else\|of\)\>' . |
114 |
| - \ ':\<end\>,' . |
115 |
| - \ '^\l[A-Za-z0-9_@]*' . |
116 |
| - \ ':^\%(\%(\t\| \{' . s:sw . '}\)\%([^\t\ %][^%]*\)\?\)\?;\s*\%(%.*\)\?$\|\.[\t\ %]\|\.$' |
117 |
| - let b:match_skip = 's:comment\|string\|erlangmodifier\|erlangquotedatom' |
118 |
| -endif |
| 114 | + \ . " | unlet b:match_ignorecase b:match_words b:match_skip" |
119 | 115 |
|
120 | 116 | let &cpo = s:cpo_save
|
121 | 117 | unlet s:cpo_save
|
|
0 commit comments