Struct clt::Editor [] [src]

pub struct Editor<'a, 'k, 'v> { /* fields omitted */ }

One editor for you to edit the given text or file.

Methods

impl<'a, 'k, 'v> Editor<'a, 'k, 'v>
[src]

Create one new editor.

Inserts or updates an environment variable mapping.

Edit a file. Examples:

use clt::Editor;

let editor = Editor::new("vim");
editor.edit_file("/path/to/myfile.py");

Edit some text. Examples:

use clt::Editor;

let editor = Editor::new("vim");
let mut text = String::new();
text.push_str("hello");
let edited = editor.edit(text, ".txt");