November 2018
Beginner
330 pages
7h 21m
English
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:
set foldmethod=indent
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:
Read now
Unlock full access