| 1 | # `edit` |
| 2 | |
| 3 | [](https://crates.io/crates/edit) [](https://docs.rs/edit/) |
| 4 | |
| 5 | `edit` is a Rust library that lets you open and edit something in a text editor, regardless of platform. (Think `git commit`.) |
| 6 | |
| 7 | 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. |
| 8 | |
| 9 | let template = "Fill in the blank: Hello, _____!"; |
| 10 | let edited = edit::edit(template)?; |
| 11 | println!("after editing: '{}'", edited); |
| 12 | // after editing: 'Fill in the blank: Hello, world!' |