File: README.md

package info (click to toggle)
rust-edit 0.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 132 kB
  • sloc: makefile: 4
file content (12 lines) | stat: -rw-r--r-- 676 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# `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!'