14
3
I have foldmethod=indent
set in my ~/.vimrc
, and in general that works for me and I'd like to keep it.
However, there are a few files I have which I edit regularly (and which are under my exclusive control), where I'd like to add in a marker-based system, in particular so that when I open the file a large section I rarely look at (which is already 'delimited' by indent) is pre-folded. It looks like foldmethod=marker
would allow me to do that (I don't mind the odd comment in the file to indicate these 'pre-folds' if necessary), but I still want foldmethod=indent
set so that I can use zc
, zo
, and so on to then fold or unfold sections by indent. As far as I can tell I can't set foldmethod to multiple values.
Is there another way I can achieve this (ideally using something embedded in the file itself)?
I'm also trying to get both fold methods of marker and indent working at the same time. I also believe that to use the fold expression is the best option. Did you find an expression to match both indent and marker? – Jp_ – 2017-03-03T17:51:30.107
1@Jp_ nope, 'fraid not. – Andrew Ferrier – 2017-03-03T22:01:37.900