The function body forgot its indentation. Select lines 2–4 with j V jj, then press > to indent the whole selection one level.
def greet():
print("hello")
print("world")
return True
Canonical solution: j V jj > · target: 4 keystrokes — the fewest that solve it (every keypress counts).
> indents, < dedents; in visual mode they act on the selection and drop you back to normal mode. Target counts j >2j (4 keys); selecting with V jj first is fine pedagogy.
| Keys | What it does |
|---|---|
| Vjj > | indent three lines |
| >2j | indent three lines without visual mode |
| gv | reselect to indent again |
| = | auto-indent the selection |
Reading about keystrokes doesn't build keystrokes. Try this in a real vim buffer right now — the “Push it in” mission takes about a minute.
Sign in free to practice →