Commenting
Ctrl-c toggles a line comment on every line the selection touches. Helix
knows the comment syntax for the file’s language — // for Rust, # for
Python, and so on — and puts the marker at the line’s indentation level, so
the code keeps its shape. Press Ctrl-c on a commented line and the marker
comes off again.
With several lines selected, or several cursors, one press comments them all. If some of those lines are already commented, Helix comments the lot rather than uncommenting the few.
Plain text has no comment syntax, so this step’s practice file is
comment.rs, a small Rust program sitting alongside the usual buffer. Work
through the checklist below: open it, comment a line, uncomment it, then
comment two lines at once.