Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 months 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 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-17T21:54:50.000Z (7 months ago)
- Last Synced: 2024-03-19T15:14:51.455Z (4 months ago)
- Topics: cross-platform, rust-lang, text-editing, text-editor
- Language: Rust
- Homepage:
- Size: 43 KB
- Stars: 36
- Watchers: 3
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-stars - edit - platform Rust library for invoking & waiting for the system text editor | milkey-mouse | 16 | (Rust)
README
# `edit`
[![crates.io](https://img.shields.io/crates/v/edit.svg)](https://crates.io/crates/edit) [![docs.rs](https://docs.rs/edit/badge.svg)](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!'