nb-nik.org

tcr

tcr is a terminal text editor for Unix. Its keybindings are mostly based on Emacs.

Installation

To install tcr into ~/.local/bin, run

cargo install --path . --root ~/.local/

Usage

Start tcr in the shell:

tcr <filename>

If the file doesn’t already exist, it will get created.

Keybindings

Basic movement

Keybinding Action
C-p / up Move up.
C-n / down Move down
C-f / right Move right
C-b / left Move left
M-f Move forwards by one word
M-b Move backwards by one word
C-a Go to the beginning of the line
C-e Go to the end of the line
C-c C-a Go to the beginning of the buffer
C-c C-e Go to the end of the buffer
M-g Jump to a specific line

Cut and paste

Keybinding Action
C-d Delete the character immediately to the right of the cursor (the character isn’t added to the clipboard)
C-SPC Set the mark at the current position
C-w Cut the region to the clipboard
M-w Copy the region to the clipboard
C-y Paste the clipboard
M-d Cut the next word
C-c C-d Duplicate line

General

Keybinding Action
C-x C-s Save the current file
C-x C-c Quit tcr
C-c C-c Save and quit
Keybinding Action
C-s Search forward (repeat search when already searching)
C-d Cut the currently matched search term

Colours

The colour palette used comes from the Modus Operandi theme.

There is currently no mechanism for changing the colours, hopefully that’ll be added soon.