-
Notifications
You must be signed in to change notification settings - Fork 1
Home
- Built for speed (see benchmarks)
spoiler: by far the fastest - The interface is nice and easy to use
- Simple and easy to understand code encourages contributions
What are the use cases for kri?
Kri was never built to replace your IDE, these are far more complex (and slow).
It was designed as a simple text editor for simple editing tasks such as editing a config file, or a small code change.
One use case would be editing a file in a headless server or an embedded device where storage is precious and there is no space for complexity. Kri is configured at compile time to avoid putting unnecessary parts (like syntax highlighting) in the binary.
When compiled with minimum components, it can be as little as 35 kilobytes (ed is 62kB, nano 283kB, vim.tiny 1.8MB).
Do you need anything else? Open a discussion.
Install required dependencies
Debian: apt install libncurses-dev make gcc git
Arch: pacman -S ncurses make gcc git
Fedora: dnf install ncurses-devel make gcc git
Clone the repo
git clone https://github.com/ikozyris/yocto
cd yocto
Build and Install
make build
sudo make install
The binary is installed on /usr/bin
.
Alternatively, it can be installed to ~/.local/bin
, which does not exist in all distros.
kri file -ro
Open file in read-only mode
kri file
Open file
kri
Just start, will ask for filename on save
- Save: Ctrl-S
- Exit: Ctrl-X
- Go to start of line: Ctrl-A
- Go to end of line: Ctrl-E
- Enter built-in terminal: Alt-C
- Show info: Alt-I (also command stats in terminal)
You can edit them in keybindings.h
Terminal commands:
- scroll Scroll to specific line
- resetheader Clear the header (top bar) and write "kti" to it
- usage Display memory usage (PSS), PID of process
- stats Show debugging and maybe useful info (buffer size, length of line, total lines...)
- help Lists these commands advanced:
- run Run a command in shell
- shrink Shrink buffer sizes to just fit text (reduce RAM usage)
main.cpp on kri
headers/gapbuffer.hpp