Pochi Doc

The editor

The editor is a terminal based modal word editor with vi-like navigation that provides a lot of facilities to edit and compile Pochi assembly sources. It is not curse-based, it uses VT100 escape sequences, this means that is should work fine on any VT100 terminals (aka most terminals on UNIX).

Note: The UI/UX might feel clunky or even buggy at times, please be mindful that it will need quite some polishing to “feel” good writing Pochi assembly with it. Any suggestions or bug reports are welcome at this point. Nothing is set in stone :)

Core concepts and Features

Since Pochi is based on ColorForth there are two concept on which our custom editor can easily provide more convenient editing than standard text editor:

This way our editor becomes both simpler while providing an enhanced editing experience.

Words, not chars

This implies that the “cursor” is always focused on a word. Of course we type the words one character at a time, but you can’t move the cursor inside a word, you can only append or delete the leading character. You can also delete the whole word, change it’s color and such with a single shortcut usually.

Not focusing on characters simplifies the internal representation of the “text” in the editor as well as the pre-parsed nature of Pochi assembly. And surprisingly enough you never really miss the ability to edit individual characters.

Colors

Due to the pre-parsed nature of Pochi assembly, an editor that aims to make the source code more readable and pleasant to work with, will have to provide a convenient way to distinguish the different roles of each words. This editor we will initially use colors to primarily distinguish between different roles.

Whenever color becomes a seemingly essential feature, the color blindness affliction becomes a show-stopper for certain people. It is good to remember that color is merely a very convenient way to tag a word visually, an example of tag that doesn’t use color do be distinguishable is the magenta words and the magenta strings.

If you are color blind or want to make the experience more convenient to work with Pochi assembly for people that are color blind, you are more that welcome to make suggestions, propose solutions or even better make another editor. By the way this applies to any type of conditions that would make it less convenient to work with Pochi assembly, like visual impairment, impaired motor functions or the likes. I really wish to make this as accessible as possible without sacrificing too much simplicity.

The colors and their roles are described in the Assembly document, but for the sake of completeness we’ll describe the different colors/roles and how the appear visually in the editor:

color visual appearance
red red color
green green color
yellow yellow color
gray white color
magenta magenta color
magenta string magenta color surrounded by double quotes
white dimmed white/gray (can be hidden)
blue blue color (can be hidden)

By default white words (comments) are shown and blue words (format) are hidden, they can be shown/hidden by using a specific key (c for comments and f for formatting words).

Key bindings

Normal mode

Insert mode

Both modes