Since we're working with Python code throughout this book, let's play with some folds in our code. First, you'll need to change a setting called foldmethod to indent in your .vimrc file:
This will tell Vim to fold based on indentation (there are multiple ways to work with folds; see the following section, Types of folds, for more information).
Open animal_farm.py and you will see portions of our file folded away:
Navigate your cursor to one of the folded lines. Hitting zo will open the current fold: