How can I automatically fold all functions in a file with vim?
If you :set foldmethod=syntax the folds will be specified from the syntax definitions. If you prefer you can :set foldmethod=indent to have the indentation define the folds. 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) … Read more