Editing Superpowers and Zen

Editing Superpowers and Zen

Surround

With mini.surround, ysiw" wraps the word under the cursor in quotes — one motion, treesitter-aware, so it works on real code structures too. Change a pair with cs'", delete it with ds".

Split and join

A function call crammed onto one line:

print(calculate(a=10, b=5, operation="multiply"))

With the cursor on (or inside) the parentheses, gS takes it apart — one argument per line, perfectly indented:

print(
    calculate(a=10, b=5, operation="multiply")
)

The same key folds it back. Toggle, not surgery. (One habit worth building: f( first — the toggle acts on the brackets at or around the cursor.)

Zen mode

When the room gets loud: <leader>z. The file floats alone, centered, everything else dimmed away. Perfect for reading unfamiliar code — or for recording a course. <leader>z brings the world back.


That is the machine. Everything documented in these chapters runs from one repository — clone the course companion repo, open Neovim once, and the lockfile builds it for you, identically, anywhere.