Crates.io | zee |
lib.rs | zee |
version | 0.3.2 |
source | src |
created_at | 2020-03-09 00:03:20.833411 |
updated_at | 2022-04-23 00:58:45.350819 |
description | A modern editor for the terminal, in the spirit of Emacs |
homepage | https://github.com/zee-editor/zee |
repository | |
max_upload_size | |
id | 216704 |
size | 309,519 |
Zee is a modern editor for the terminal, in the spirit of Emacs. It is written in Rust and it is somewhat experimental.
In the old tradition of text editor demos, here's what it currently looks like editing its own source code
The recommended way to install zee is using cargo
cargo install zee
To start the editor run zee
. As expected, you can pass in one or multiple files to be opened, e.g. zee file1 file2
.
To enable integration with your system's clipboard, install zee with the system-clipboard
feature
cargo install --features system-clipboard zee
To build with clipboard support, you'll additionally need x11 bindings on Linux. On a Debian-y distribution, you can install them like this
sudo apt install xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev
Zee uses Tree-sitter parsers for syntax highlighting and on the fly validation of source code. To download and build the parsers, simply run
zee --build
The parsers are downloaded, compiled and placed in a runtime/
directory inside the config
directory. The exact location is system specific, e.g. ~/.config/zee/runtime
on Linux or macOS
and %AppData%/zee/runtime
on Windows.
Zee is written in Rust and it requires the latest stable compiler to build. You can use cargo to build it as you'd expect
git clone https://github.com/zee-editor/zee.git && cd zee
cargo run -- zee/src/main.rs
The editor also depends on tree sitter parsers, one for each supported language.
For now, those are configured statically using the zee/modes.ron
file. Each
tree sitter parser is compiled to a shared object which is linked dynamically.
Running cargo build
downloads and builds this parsers just to ensure
everything works correctly. You can skip this step by setting
ZEE_DISABLE_GRAMMAR_BUILD
, e.g.
ZEE_DISABLE_GRAMMAR_BUILD=t cargo run -- zee/src/main.rs
To start the editor run zee
. As expected, you can pass in one or multiple files to be opened,
e.g. zee file1 file2
.
Zee uses Emacs-y keybindings. Feeling at home with the default Emacs bindings is a goal of the project.
Below, C-
means Ctrl
+ the specified key, e.g. C-k
is Ctrl + k
. Similarly A-
means
Alt
+ the specified key. Empty spaces denote a sequence of key presses, e.g. C-x C-c
means
first pressing C-x
followed by C-c
.
The following keybindings are available:
C-f
, Right
move forwardC-b
, Left
move backwardC-n
, Down
move downC-p
, Up
move upA-f
move forward by one wordA-b
move backward by one wordA-n
move forward by one paragraphA-p
move backward by one paragraphC-a
, Home
move to start of lineC-e
, End
move to end of lineC-v
, PageDown
move down one pageA-v
, PageUp
move up one pageA-<
move to the beginning of the bufferA->
move to the end of the bufferC-l
centre the cursor visuallyC-d
delete forwardsBackspace
delete backwardsC-k
delete the current lineC-SPC
enter selection mode at the current cursor positionC-w
cut selectionA-w
copy selectionC-x h
select the entire buffer and move the cursor to the beginningC-y
paste selection (yank in Emacs)C-g
clear the current selectionC-_
, C-z
, C-/
undo previous commandC-q
redo previous commandC-x u
open the edit tree viewerEnter
insert a new line, moving the cursorC-o
insert a new line after the cursor, without moving itC-x C-s
save the current bufferC-x C-f
choose a file to open using a directory-level pickerC-x C-v
search recursively for a file to open from the selected directoryC-l
while opening a file, go to the parent directoryTab
while opening a file, fills in the currently selected pathC-p
, Up
move up the tree to an older revision, undoing the commandC-n
, Down
move down the tree to a newer revision, redoing the commandC-b
, Left
select the left child of current revisionC-f
, Right
select the right child of current revisionC-g
cancel the current operationC-x k
choose a buffer to closeC-x b
switch the current window to another bufferC-x 0
, C-x C-0
close the focused windowC-x 1
, C-x C-1
make the focused window fullscreenC-x 2
, C-x C-2
split the focused window belowC-x 3
, C-x C-3
split the focused window to the rightC-x o
, C-x C-o
switch focus to the next bufferC-x C-t
cycle through the available themesC-x C-c
quitThis project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.