Commit d89667f7 authored by Ticki's avatar Ticki


parent 4cc09fa4
......@@ -2,6 +2,7 @@ use std::cmp::min;
use std::ops::{Index, IndexMut};
use std::str::Chars;
/// A line in a buffer.
pub trait Line<'a> {
/// The underlying iterator.
type Iter: Iterator<Item = char> + 'a;
......@@ -97,6 +97,7 @@ impl Editor {
/// Hint the buffer about the cursor position.
pub fn hint(&mut self) {
let x = self.cursor().x;
let y = self.cursor().y;
......@@ -3,9 +3,13 @@ use editor::Editor;
use std::fs::File;
use std::io::{Read, Write};
/// The status of a file IO operation.
pub enum FileStatus {
/// Oll fino.
/// File not found.
/// Other error.
......@@ -9,8 +9,11 @@ use std::io::prelude::*;
/// Key state
pub struct KeyState {
/// Ctrl modifier.
pub ctrl: bool,
/// Alt modifier.
pub alt: bool,
/// Shift modifier.
pub shift: bool,
//! Sodium is a next generation Vi-like editor.
// #![deny(missing_docs)]
#[cfg(feature = "orbital")]
extern crate orbclient;
/// Primitives for debugging.
pub mod debug;
/// The text buffer.
pub mod buffer;
/// Cursors.
/// A cursor contains various non-global information about the editor state. You can switch between
/// cursor, for reusing older editor states.
pub mod cursor;
/// Delete text, defined by a motion.
pub mod delete;
/// The global editor state.
pub mod editor;
/// Executing commands.
pub mod exec;
/// Loading and writing files.
pub mod file;
/// Graphics and rendering.
pub mod graphics;
/// Insertion of text.
pub mod insert;
/// "Invertion" of text.
pub mod invert;
/// Key input and parsing.
pub mod key;
/// The "key state" of the editor.
/// The key state contains information about the current state of modifiers.
pub mod key_state;
/// Editor modes.
pub mod mode;
/// Motions.
/// A motion is a command defining some movement from point A to point B, these can be used in
/// mulitple context, for example as argument for other commands.
pub mod motion;
/// Movement.
pub mod movement;
/// Options and configuration of the editor.
pub mod options;
/// Parsing of input commands.
pub mod parse;
/// Calculations and bounding of positions.
pub mod position;
/// The command prompt.
pub mod prompt;
/// Partial redraws.
pub mod redraw;
/// Selection through motions.
pub mod selection;
fn main() {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment