0
0
Fork 0
chalk/README.md

44 lines
2.7 KiB
Markdown
Raw Permalink Normal View History

# chalk - a line based text editor
2018-12-04 06:08:16 +00:00
2020-07-12 23:09:06 +00:00
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](gopher://colorfield.space:70/). 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).
2018-12-04 06:08:16 +00:00
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.
2018-12-04 06:08:16 +00:00
## Requirements
2018-12-04 06:08:16 +00:00
Requires Python 3.6+. No other Python dependencies, standard library only.
2020-07-12 23:09:06 +00:00
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_`.
2018-12-04 06:09:30 +00:00
## Commands
2018-12-04 06:09:30 +00:00
Commands are entered as the only text on their row. Enter the command and press enter.
2018-12-04 06:09:30 +00:00
| Command | Action |
|:-------:|:------------------------------------------------------------------------------:|
2020-04-23 05:26:21 +00:00
| .? | Print the command list |
| .a | Save AS (will prompt for new path) |
| .f | Print file info |
2020-04-23 05:26:21 +00:00
| .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) |
2018-12-04 06:09:30 +00:00
2018-12-04 06:08:16 +00:00
2020-04-20 04:50:04 +00:00
## Notes
2018-12-04 06:08:16 +00:00
2020-04-20 04:50:04 +00:00
This application uses the python readline bindings to allow for hotkey line navigation (ex. Ctrl-a to go to the beginning of the line).
2018-12-04 06:08:16 +00:00