Skip to content
ikozyris edited this page Aug 25, 2024 · 22 revisions

Why use Yocto?

  1. Built for speed (see benchmarks)
    spoiler: by far the fastest
  2. The interface is nice and easy to use
  3. Simple and easy to understand code encourages contributions

What are the use cases for yocto?
Yocto 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. Yocto 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 46 kilobytes (ed is 62kB, nano 283kB, vim.tiny 1.8MB).

Do you need anything else? Open a discussion.

Installation Instructions

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.

Usage

yocto file -ro Open file in read-only mode
yocto file Open file
yocto Just start, will ask for filename on save

Basic Keybindings:

  • 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 "Yocto" 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)

images

main.cpp on Yocto
main.cpp on yocto

headers/gapbuffer.hpp
gapbuffer header file in yocto

Clone this wiki locally