My mods of a post-modern modal text editor.
9821c4dd3b
Checked the ASM output for these three options: pub enum Operation { /// Move cursor by n characters. Retain(usize), /// Delete n characters. Delete(usize), /// Insert text at position. Insert(String), } pub struct A { changes: Vec<Operation>, len: usize, } impl A { pub fn is_empty1(&self) -> bool { match self.changes.as_slice() { [] => true, [Operation::Retain(_)] => true, _ => false, } } /// `true` when the set is empty. pub fn is_empty2(&self) -> bool { let len = self.changes.len(); len == 0 || ( len == 1 && self.changes[0] == Operation::Retain(self.len) ) } pub fn is_empty3(&self) -> bool { match self.changes.as_slice() { [] | [Operation::Retain(_)] => true, _ => false } } } |
||
---|---|---|
.github/workflows | ||
doc | ||
helix-core | ||
helix-lsp | ||
helix-syntax | ||
helix-term | ||
helix-view | ||
.envrc | ||
.gitignore | ||
.gitmodules | ||
Cargo.lock | ||
Cargo.toml | ||
flake.lock | ||
flake.nix | ||
README.md | ||
shell.nix | ||
TODO.md |
Helix
Crate | Description |
---|---|
helix-core | Core editing primitives, functional. |
helix-syntax | Tree-sitter grammars |
helix-view | UI abstractions for use in backends, imperative shell. |
helix-term | Terminal UI |
Installation
git clone --depth 1 --recurse-submodules -j8 https://github.com/helix-editor/helix
cd helix
cargo install --path helix-term
This will install the hx
binary to $HOME/.cargo/bin
.