Skip to main content

Crate soe

Crate soe 

Source
Expand description

Scott’s Own Editor — a built-in TUI text editor for CLI tools.

Provides a single entry point that resolves the best available editor using Git’s precedence ($GIT_EDITORcore.editor$VISUAL$EDITOR) and falls back to a built-in TUI editor when none is configured.

// One call — handles external editors and built-in fallback automatically
let result = soe::capture("Enter your message (lines starting with # are ignored)")?;

// Or with pre-filled content
let result = soe::capture_with_initial("Edit the description", "existing text here")?;

// Direct access to the built-in TUI editor
let result = soe::edit("filename", "initial content", soe::EditorMode::PlainText)?;

Enums§

EditorMode
Controls editor behavior for different editing contexts.

Functions§

capture
Open the best available editor with comment-prompt instructions.
capture_with_initial
Like capture, but pre-fills the buffer with initial content.
edit
Open the built-in TUI editor with initial content.
edit_file
Open the built-in editor for a file on disk.