curd-editor 0.3.0

A tiny terminal code editor with line numbers, folding and snippets
mod document;
mod editor;
mod folds;
mod snippets;
mod terminal;

use document::Document;
use editor::Editor;
use terminal::Terminal;

fn main() -> std::io::Result<()> {
    let document = match std::env::args().nth(1) {
        Some(path) => Document::open(&path)?,
        None => Document::default(),
    };

    let _terminal = Terminal::start()?;
    let mut editor = Editor::new(document);
    editor.run()
}