The return line is indented too far. Move onto it (j) and dedent it one level with <<.
def total():
return 42
Canonical solution: j << · par: 3 keystrokes (vimgolf rules — every keypress counts).
<< removes one shiftwidth of indentation; >> adds one. If a line is buried under too much whitespace, stack them (2<<) or just repeat with the dot command.
Reading about keystrokes doesn't build keystrokes. Try this in a real vim buffer right now — the “Back it out” mission takes about a minute.
Practice free — no signup →