Write user-documentation

This commit is contained in:
Matúš Púll 2025-06-25 15:56:16 +02:00
parent 4696eca6c3
commit 131a0d3384

View file

@ -1,7 +1,61 @@
# editor # Ze ed
Deez Like deez, but backwards.
Ze is a terminal [vim](https://www.vim.org/)-like text editor.
It uses a *treap* data structure to represent file by lines and remembers versions with added *semi-persistence*.
## Dependencies ## Dependencies
`ncurses` c knihovna * `ncurses` c library
## Build
Described in the `Makefile`
## Usage
`ze <filename>`
## Modes
Ze has three modes within which you can edit a file - *normal*, *insert* and *select*.
Those represent what the user is currently doing:
* *insert* mode: Writing text
* *select* mode: Operations on a selection
* *normal* mode: Everything else
## Default keybinds
`<char>` - Action
### Normal mode
* `h`,`j`,`k`,`l` - Vim-like movement
* `g` - Goto a specified line
* `G` - Goto the last line
* `d` - Remove current line
* `x` - Remove character under cursor
* `o` - Insert empty line before the current
* `q` - Quit
* `w` - Save
* `u` - Undo latest editation action
* `f` - Find next appearance a specified string
* `n` - Repeat last find
* `s` - Find-and-replace
* `r` - Repeat last find-and-replace
* `p` - Paste selection
* `i` - Change into insert mode
* `v` - Change into select mode
### Insert mode
* `<ESC>` - Change into normal mode
* Anything else is written under the cursor
### Select mode
* `h`,`j`,`k`,`l` - Vim-like movement
* `g` - Goto a specified line
* `G` - Goto the last line
* `v` - Copy selected text
* `x` - Remove selected text
* `<ESC>` - Change into normal mode