My vimrc includes the following snippet:
if has('unix')
language messages C
else
language messages en
endif
I just noticed that repeatedly hitting % (with matchit enabled) cycles
from the if to the else to the en in "language messages en" and back.
% on the final endif goes to the next outer if clause, which happens
to be an "if 1" near the top of my vimrc correlated with an endif near
the bottom, in order to avoid syntax errors for assignment statements
etc. in builds compiled without the +eval feature.
b:match_words is set (in that buffer) to
\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,{:},\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,
This means that "en" will be interpreted as "endif" even if, like
here, it is part of a longer statement. I'm not sure how to fix it
considering that if, else, elseif, endif should be recognised not only
at start of line but also after a vertical bar, in both cases with
zero or more intervening spaces and/or tabs.
Best regards,
Tony.
--
--
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/CAJkCKXsGEUneQaWq-_uVBfU%2BYkvJXFupz44BvsbaKWKF1ocEpg%40mail.gmail.com.