I'm writing a helpfile for a plugin, i.e. a foo.txt  file that goes in the plugin's doc/ directory. At the bottom of that file I placed the following modeline:vim: tw=70 ft=help fdm=marker fmr={{{,}}} fdl=0Now here's the problem:When opened directly with vim foo.txt, the file is displayed with the correct foldlevel of 0 (folds delimited by markers are closed), which means the modeline was correctly interpreted.When opened as a help file within vim as :help foo, the file is displayed with folds opened, which means the modeline was not correctly interpreted.So the question is: how do I get the folds to appear initialy closed when the helpfile is opened with :help?Is it even possible?Note that the problem can be tested (and hopefully reproduced) by copyingthe following code to e.g. ~/.vim/doc/foo.txt*foo*{{{This line should appear initially folded}}}vim: tw=70 ft=help fdm=marker fmr={{{,}}} fdl=0then comparing what happens with> vim ~/.vim/doc/foo.txtvs.> vim:helptags ~/.vim/doc/:help foo
Modeline folding not working on help file
folding;help system;modeline
Vim treats help files special and resets some options beofre opening them. After trying your example, what seems to work is to add an explicit :set foldenable to your modeline, e.g. this seems to work for me:vim: tw=70 ft=help fdm=marker fmr={{{,}}} fdl=0 fen