Skip to content

schacon/soe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soe — Scott's Own Editor

A built-in TUI text editor for CLI tools. Resolves the best available editor using Git's precedence order and falls back to a built-in TUI when none is configured.

CleanShot 2026-05-11 at 08 42 29@2x

Built on ratatui and crossterm.

Features

  • One-call editor resolution: $GIT_EDITORcore.editor$VISUAL$EDITOR → built-in TUI
  • Menu bar (File / Help), line numbers, word navigation
  • Mouse support (click to position cursor, scroll)
  • Two modes: PlainText and CommitMessage (72-char guide line + soft wrap)
  • Tab expansion (4 spaces)
  • RAII terminal guard — restores terminal state even on panic
  • Save (Ctrl+S) returns content, cancel (Esc) returns None

Usage

// One call — resolves external editor or falls back to built-in TUI.
// Comment lines (starting with #) are stripped from the result.
let result = soe::capture("Enter your message")?;

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

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

License

MIT

About

Scott's Own Editor — a built-in TUI text editor for CLI tools, no vim required

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages