For a single file (like ~/.vimrc
), I would configure the folding via a modeline; i.e. a special comment at the end of the file that Vim recognizes and sets the fold-related options accordingly. Note: I wouldn't use {,}
as fold markers, as those also occur in Vimscript (to define Dictionary objects); better stick to the original ones:
" vim: set fdm=marker fmr={{{,}}} fdl=0 :
You would then introduce the folding blocks like this:
" Environment {{{
Why your global fold settings don't work, I don't know. It may be caused by spf-13. Vim "distributions" like spf-13 and Janus lure you with a quick install and out-of-the-box settings, but you pay the price with increased complexity (you need to understand both Vim's runtime loading scheme and the arbitrary conventions of the distribution) and inflexibility (the distribution may make some things easier, but other things very difficult). Vim is incredibly customizable, using someone else's customization makes no sense.