DSCC
home / guides / interactive-mode

Interactive Mode

The interactive REPL is the default DSCC experience. Start it with dscc (no subcommand) on any TTY. The input editor lives at crates/dscc-cli/src/input.rs (1193 lines).

Editor modes

DSCC ships a custom editor with optional vim bindings. Toggle vim on/off at runtime with /vim (input.rs:549–553).

Mode Enter Exit Purpose
Plain vim disabled /vim Single-mode editing, no motions
Insert vim on (default) Esc Normal text entry
Normal Esc from Insert i back to Insert h j k l motion, d y operators, dd, yy, p
Visual v in Normal Esc Move with h j k l, delete/yank selection
Command : in Normal Esc Ex-style command line

Keybindings

Key Context Action Source
Ctrl+C input non-empty Cancel current line input.rs:375–380
Ctrl+C empty prompt Exit DSCC input.rs:375–380
Ctrl+D empty prompt Exit DSCC input.rs:388–391
Ctrl+J Insert Insert newline input.rs:382–386
Enter any Submit prompt input.rs:400–406
Shift+Enter any Insert newline input.rs:400–406
Tab slash prefix Cycle slash-command completion input.rs:689–746
Up / Down any Walk input history input.rs:748–789
Left / Right / Home / End any Cursor navigation input.rs:416–439

Non-TTY fallback

When stdin is not a terminal (pipe, CI, redirect), DSCC drops into a line-by-line reader with no prompt, no history, and no completion (input.rs:334–366). For scripting, prefer dscc prompt ... instead.

See also