Taking the approach that this is just another symptom that cleaning up
all the crud that thas accumulated in my vim environment over the years
is long overdue... I decided to look into this further and found the
culprit: I ended up looking at an ~8-year-old mediawiki.vim (!) file in
my ~/.vim/ftdetect.
The lines that cause the problem:
setlocal foldexpr=getline(v:lnum)=~'^\\(=\\+\\)[^=]\\+\\1\\(\\s*<!--.*-->\\)\\=\\s*$'?\">\".(len(matchstr(getline(v:lnum),'^=\\+'))-1):\"=\"
setlocal fdm=expr
I imagine someone familiar with foldexpr's would see at a glance what's
wrong with the fold expression when the number of lines in the file runs
in the thousands...
A bit odd that this should take effect on markdown *.md files or *.txt
files that have nothing to do with *.mw, *.wiki, or *.mediawiki...
Anyway, after commenting out those two lines I'm no longer able to
recreate the problem... and more importantly stuff that I had initially
suspected has now been proven innocent.
I looked at the current version of the mediawiki stuff on github and it
turns out that the foldexr/foldmethod logic was moved to
ftplugin/mediawiki.vim... When I have time I should probably take a look
at the current version... see if this issue (at least in my context) has
been addressed.
Thanks,
CJ
--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200608172324.GA12522%40turki.local.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment