https://github.com/milkey-mouse/edit
Cross-platform Rust library for invoking & waiting for the system text editor
https://github.com/milkey-mouse/edit
cross-platform rust-lang text-editing text-editor
Last synced: about 1 year ago
JSON representation
Cross-platform Rust library for invoking & waiting for the system text editor
- Host: GitHub
- URL: https://github.com/milkey-mouse/edit
- Owner: milkey-mouse
- License: cc0-1.0
- Created: 2020-01-21T08:04:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-14T20:16:58.000Z (over 1 year ago)
- Last Synced: 2025-03-14T21:28:27.379Z (over 1 year ago)
- Topics: cross-platform, rust-lang, text-editing, text-editor
- Language: Rust
- Homepage:
- Size: 43 KB
- Stars: 45
- Watchers: 2
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `edit`
[](https://crates.io/crates/edit) [](https://docs.rs/edit/)
`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!'