Skip to main content

Module surround

Module surround 

Source
Expand description

surround-mode – vim-surround semantics as a native minor mode.

Three grammar operators: surround-delete (ds{char}), surround-change (cs{char1}{char2}), surround-add (yss{char} / S{char} in visual). All three are registered in the shared CommandRegistry at boot.

Design: docs/dev/architecture/surround-mode.md; slice plan: docs/dev/operations/slice-plans/surround-mode.md.

Structs§

SurroundMode
Minor mode providing vim-surround operations.
SurroundOperators
Typed handles for the surround operators.

Functions§

find_surround_pair
Find the nearest enclosing pair matching target around the cursor position.
open_close_pair
Map a user-provided character to its canonical (open, close) pair.
register_surround_modes
Register surround-mode in the ModeRegistry. Must be called AFTER register_surround_operators so the operator IDs are available for keymap construction.
register_surround_operators
Register the three surround operators in the shared CommandRegistry. Called from the host’s grammar bootstrap.