In this video, we reformat our file by removing our current indentation, then auto-format it as a perl script
We then change the foldmethod to indent and see:
zo - opens a single fold
zc - closes a single fold
zO - opens all folds in a single nested fold
zC - closes all folds in a single nested fold
zr - reduce all folds one level (same as zo but for all folds)
zR - reduce all folds all the way (same as zO for all folds)
zm - fold up (minus) a nested fold level for all folds (same as zc for all folds)
zM - fold up (minus) all nested folds levels for all folds (same a zC for all folds)
Foldmethods are:
Manual – folds must be defined by entering commands (like zf)
indent - creates a fold for each indent
Syntax – create a fold by the syntax of a programming language
Expr – folds are created by a user-defined expression (like a regex / regular expression)
Marker – Create folds for a start and end characters you define
Diff – used to fold unchanged text when viewing differences (automatically set in diff mode)
See the complete Vim playlist at:
https://www.youtube.com/watch?v=1lzXr-MztOU
See the complete Vim playlist in a single video at:
https://www.youtube.com/watch?v=3G6kAEvbv2A
Website link:
https://thefrugalcomputerguy.com/linux/seriespg.php?ser=10002
5 Comments