From 7ff58d6f760b181b81cac040980d7d27a3eb948a Mon Sep 17 00:00:00 2001 From: Madeleine Date: Mon, 5 Dec 2022 14:11:48 +0000 Subject: [PATCH] renamed to velocity --- Cargo.lock | 14 +++++++------- Cargo.toml | 6 +++--- README.md | 24 ++++++++++++------------ src/core/buffer.rs | 6 +++--- src/core/editor.rs | 2 +- src/main.rs | 6 +++--- src/tui/components/statusbar.rs | 4 ++-- src/tui/components/welcome.rs | 2 +- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa77f7c..b14a400 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -45,13 +45,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "lambda" -version = "0.1.0" -dependencies = [ - "crossterm", -] - [[package]] name = "libc" version = "0.2.137" @@ -163,6 +156,13 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +[[package]] +name = "velocity" +version = "0.1.0" +dependencies = [ + "crossterm", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index d21bb82..fcdfcc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "lambda" +name = "velocity" version = "0.1.0" authors = ["Madeline "] edition = "2021" description = "Next generation hackable text editor for nerds" -homepage = "https://github.com/SpyHoodle/lambda" -repository = "https://github.com/SpyHoodle/lambda" +homepage = "https://github.com/SpyHoodle/velocity" +repository = "https://github.com/SpyHoodle/velocity" readme = "README.md" include = ["src/*.rs", "Cargo.toml"] categories = ["text-editors"] diff --git a/README.md b/README.md index 7389f60..418d669 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,29 @@ -# λ Lambda +# λ Velocity A next-generation hackable incredibly performant rust text editor for nerds. -> ⚠️ Lambda is in *very* early stages at the moment. Lambda's goals are still being decided and features may completely change. +> ⚠️ Velocity is in *very* early stages at the moment. Velocity's goals are still being decided and features may completely change. ## Overview -Lambda is a similar text editor to `vim` or `kakoune`, taking some ideas from `xi`. +Velocity is a similar text editor to `vim` or `kakoune`, taking some ideas from `xi`. The main goal is to build the best text editor possible by taking ideas from existing text editors and implementing them in the best possible way. -- Lambda is written in Rust, so it's incredibly fast and logical +- Velocity is written in Rust, so it's incredibly fast and logical - It's also full of comments, so anyone can try and learn what it's doing -- Lambda is very modular and extensible, so features can be easily added through a variety of methods +- Velocity is very modular and extensible, so features can be easily added through a variety of methods - Need to run a set of keybinds in order? Create a macro - Need to create a completely new feature? Just fork it and write it in Rust -- Lambda is separated between the core and the standard terminal implementation +- Velocity is separated between the core and the standard terminal implementation - This means that anyone can implement their own keybinds, ui, themes, styling, etc. - - This also means that there is one standard way for managing the text itself - inside of the lambda core -- Lambda is a modal text editor and uses ideas from kakoune, and is designed for the select -> action structure + - This also means that there is one standard way for managing the text itself - inside of the Velocity core +- Velocity is a modal text editor and uses ideas from kakoune, and is designed for the select -> action structure - Since anyone can implement their own keybinds, it's possible to make a vim implementation that uses the action -> select structure -- Lambda follows the unix philosophy of "do one thing and do it well" +- Velocity follows the unix philosophy of "do one thing and do it well" - It has no bloated features like splits or tabs - It contains the bare necessities and provides a few extra modules -- Lambda has much better default keybindings than other text editors +- Velocity has much better default keybindings than other text editors ## Getting started You'll need `cargo` (ideally from `rustup`) and an up to date version of `rust`. ```bash -git clone https://github.com/SpyHoodle/lambda.git # Clone the repositiory -cargo run # Build and run lambda! +git clone https://github.com/SpyHoodle/velocity.git # Clone the repositiory +cargo run # Build and run velocity! ``` diff --git a/src/core/buffer.rs b/src/core/buffer.rs index f7c277a..7433d3d 100644 --- a/src/core/buffer.rs +++ b/src/core/buffer.rs @@ -10,9 +10,9 @@ pub enum BufferKind { impl BufferKind { pub fn as_str(&self) -> &str { match self { - BufferKind::Scratch => "*Scratch*", - BufferKind::Write => "Write", - BufferKind::Read => "Read", + BufferKind::Scratch => "*scratch*", + BufferKind::Write => "write", + BufferKind::Read => "read", } } } diff --git a/src/core/editor.rs b/src/core/editor.rs index 513a88b..e3ea4a4 100644 --- a/src/core/editor.rs +++ b/src/core/editor.rs @@ -11,7 +11,7 @@ impl<'a> Config<'a> { pub fn new() -> Self { Self { logo: "λ", - friendly_name: "Lambda", + friendly_name: "Velocity", } } } diff --git a/src/main.rs b/src/main.rs index 004ed55..87e7cd1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,12 +14,12 @@ fn main() { let file_name = file_path.clone(); let file_name = if args.len() > 1 { file_name.file_name().unwrap().to_str().unwrap() } else { "" }; - // Create a new editor - let lambda = core::editor::Editor::new(file_path, file_name); + // Initalise a new editor + let velocity = core::editor::Editor::new(file_path, file_name); // Initalise a screen let mut screen = terminal::screen::Screen::new().unwrap(); // Begin lambda - tui::ui::start(&mut screen, lambda); + tui::ui::start(&mut screen, velocity); } diff --git a/src/tui/components/statusbar.rs b/src/tui/components/statusbar.rs index b51fdf3..ab9d8bd 100644 --- a/src/tui/components/statusbar.rs +++ b/src/tui/components/statusbar.rs @@ -51,7 +51,7 @@ pub fn draw(screen: &mut Screen, editor: &Editor) -> Result<(), ()> { Coords::from(x, status_height), ); } - + let x = if editor.buffer.name.len() > 0 { x + file_name.len() } else { x + buffer_kind.len() }; screen.write_at( " ".repeat(screen.size.width - x).reverse().to_string(), @@ -60,4 +60,4 @@ pub fn draw(screen: &mut Screen, editor: &Editor) -> Result<(), ()> { Ok(()) } -} \ No newline at end of file +} diff --git a/src/tui/components/welcome.rs b/src/tui/components/welcome.rs index 0847341..7021387 100644 --- a/src/tui/components/welcome.rs +++ b/src/tui/components/welcome.rs @@ -11,7 +11,7 @@ pub fn draw(screen: &mut Screen, editor: &Editor) { "", "Type :help to open the README.md document", "Type :o to open a file and edit", - "Type :q! or to quit lambda", + "Type :q! or to quit the editor", ]; // If the screen is big enough, we can draw