-
Notifications
You must be signed in to change notification settings - Fork 0
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/kri.git
cd kri
Build and Install
make build
sudo make install
The binary is installed by default on /usr/bin, but it is configurable in the (see PATHT variable in the Makefile)
There is a also an AUR package which is prefered for automatic updates.
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
Built-in terminal: Alt-C
Delete line: Ctrl-K
Open other file: Alt-R
Previous/Next word Shift + Left/Right arrow
Show debbuging info: Alt-I (also command stats in built-in terminal)
scroll Scroll to line
suspend Suspend and wait for signal
find Find string, takes 2 parameters, can be combined
2 other prompts follow asking for old and new string
find <str> \n \n -> highlight on all lines
find <str> \n 0-10 c -> count on lines [0-10]
replace Replace string, 2 parameters from, to (default 0, max)
replace \n <str1> \n <str2> -> replace all str1 with str2
replace 0 20 \n <str1> \n <str2> \n -> in range [0,20]
replace_thi \n <str1> \n <str> -> only in current line
help List commands
main.cpp on kri
headers/gapbuffer.hpp
