edit

Crates.ioedit
lib.rsedit
version0.1.5
sourcesrc
created_at2020-01-21 08:05:23.806995
updated_at2023-12-17 21:55:01.093406
descriptionOpen a file in the default text editor
homepage
repositoryhttps://github.com/milkey-mouse/edit
max_upload_size
id200707
size28,177
Milkey Mouse (milkey-mouse)

documentation

README

edit

crates.io docs.rs

edit is a Rust library that lets you open and edit something in a text editor, regardless of platform. (Think git commit.)

It works on Windows, Mac, and Linux, and knows about lots of different text editors to fall back upon in case standard environment variables such as VISUAL and EDITOR aren't set.

let template = "Fill in the blank: Hello, _____!";
let edited = edit::edit(template)?;
println!("after editing: '{}'", edited);
// after editing: 'Fill in the blank: Hello, world!'
Commit count: 23

cargo fmt