Skip to content
ikozyris edited this page May 21, 2024 · 16 revisions

Why use Yocto?

Yocto is:

  1. Built for speed (see benchmarks)
    spoiler: by far the fastest
  2. The interface is nice and easy to use.
  3. Easy to understand code
  4. Source code is less than 1K lines Do you need anything else? Open a discussion.

Installation Instructions

Install required dependencies

sudo apt install libncurses-dev g++ make

Clone the repo

git clone https://github.com/ikozyris/yocto
cd yocto

Build and Install

make build
make install

The binary is installed on ~/.local/bin make sure that the directory exists and is in the $PATH. Alternatively, copy it to a directory which is in the path; e.g., /usr/bin.

Usage

Until a 0.8 stable is released (backport 0.7 stuff), there will be only one (optional) parameter: the file.
If no file is specified, then when trying to save with Ctrl-S, you will be asked to enter the file name.
Example:
yocto /etc/os-release

Basic Keybindings:

  • Save: Ctrl-S
  • Exit: Ctrl-C
  • 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 "Yocto" to it
  • usage Display shared memory usage (actual is lower), PID of process
  • stats Show debugging info (gap, buffer size, length of line...)
  • help Lists these commands advanced:
  • run Run a command
  • shrink Shrink buffers to just fit text (reduce overhead)
  • setgap Change the start of gap

Related images

Makefile on Yocto
image

headers/gapbuffer.hpp
image