editor-command 1.0.0

Open files in a user's configured editor
Documentation

editor-command

Test CI crates.io docs.rs

Load a user's preferred file editing command from the VISUAL or EDITOR environment variables.

use editor_command::EditorCommand;
use std::process::Command;

std::env::set_var("VISUAL", "vim");
let mut command: Command = EditorCommand::edit_file("file.txt").unwrap();
command.spawn();