You can close all folds with zM. If you have nested folds and you want to fold level by level, use zm. To open folds use zR (all) and zr (level by level).