mirror of https://github.com/helix-editor/helix
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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 } } } |
4 years ago | |
---|---|---|
.github/workflows | 4 years ago | |
doc | 4 years ago | |
helix-core | 4 years ago | |
helix-lsp | 4 years ago | |
helix-syntax | 4 years ago | |
helix-term | 4 years ago | |
helix-view | 4 years ago | |
.envrc | 4 years ago | |
.gitignore | 4 years ago | |
.gitmodules | 4 years ago | |
Cargo.lock | 4 years ago | |
Cargo.toml | 4 years ago | |
README.md | 4 years ago | |
TODO.md | 4 years ago | |
flake.lock | 4 years ago | |
flake.nix | 4 years ago | |
shell.nix | 4 years ago |
README.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
.