i have a – probably – simple problem with gVim under Ubuntu. I can’t use folding in my files. I’m using all the folding releated commands like zi, zm, zr, etc. but none of it seems to work. I’m not even getting any errors after using them.
Is there any option i should turn on before i can start using folding (if that’s important – folding is also not working under regular, non graphical Vim) ? My gVim version is 7.2.330
Thanks for any help!
If you use
manualfolding, you have to create the folds before you can use them.Select an area you want to fold in visual mode and then type
zfto create the fold. Consulting:help fold-commandsgives you more info on that.The disadvantage of
manualis, that your created folds are lost after you close the file. To have persistent folds, try setting thefoldmethodtosyntaxwhich creates folds based on the filetype (you’ll have to do a:syntax enablebefore, maybe in your.vimrc).I often end up setting
foldmethodtomarkerand create the markers by myself.If you want to keep your global setting of
fdm=manual, you could specify amodelinein those files that use different settings.