Fork 0
Chalk is a line based text editor for the terminal. In use at colorfield.space https://sloum.colorfield.space/docs/chalk/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sloum a1fe2eb175 Changes pypi name 2 years ago
.gitignore Adds gitignore details 2 years ago
LICENSE Adds license 2 years ago
README.md Updates readme 2 years ago
chalk Fixes bad global reference 2 years ago
setup.py Changes pypi name 2 years ago


chalk - a line based text editor

Chalk is a line based text editor for the terminal. It was originally an integrated part of colorsh, a custom shell used for ssh accounts at Colorfield Space. It has since been separated out as a standalone program usable anywhere with python3 and python3's readline (a batteries included feature of python3 for most operating systems).

I tend to think about chalk as a simpler ed, similar to how some people use nano as simpler terminal editor than vi. It is far less powerful than ed, but functions in a similar line by line style with easy commands that walk you through the actions you are wanting to perform.


Requires Python 3.6+. No other Python dependencies, standard library only.

Copy the file chalk to anywhere on your system path and make sure it is executable.

From there you can run chalk or chalk _filepath_.


Commands are entered as the only text on their row. Enter the command and press enter.

Command Action
.? Print the command list
.a Save AS (will prompt for new path)
.f Print file info
.g Print the GUIDE (ruler)
.d DISPLAY the whole file
.v VIEW a portion of the file
.m View MORE (use after having called .v to view more of the file)
.# EDIT a line (eg. "!23" to edit line 23)
.i INSERT blank rows (will prompt for location and count)
.x CUT rows (will prompt for range and then add the cut data to the paste buffer)
.c COPY rows to the paste buffer (will prompt for range)
.p PASTE from the paste buffer (will prompt for location)
.b Print the contents of the paste BUFFER
.s SAVE any unsaved changes to the document
. Quit chalk (will prompt for save if there are unsaved changes)


This application uses the python readline bindings to allow for hotkey line navigation (ex. Ctrl-a to go to the beginning of the line).