A text editor that is modal in a terminal and modeless in a window, with syntax highlighting in both. The same engine is underneath, so a file edited one way behaves the same the other way.
syn-edit file.c # the terminal editor: i to insert, :w, :q
syn-edit gui file.c # the window
syn-edit langs # every language that is highlightedThe terminal editor is vi-shaped — motions, operators, counts, registers,
: commands. The window is not: it types where you click, Ctrl+S saves,
and the modal keys are available through gui insert and friends for anyone
who wants them.
The editor's engine runs without a terminal, which makes it useful in a pipeline and is how it is tested:
syn-edit run file.txt -k 'ggdG' # apply keys, print the result
syn-edit run file.txt -c '%s/a/b/g' -w # an ex command, written back
syn-edit ex file.txt -c '1,5d' # only ex commands
syn-edit highlight file.c # the syntax spans it scans to--status prints the cursor, mode and message as records, so a front end can
drive the engine and draw its own screen.
The graphical window needs quickshell. wl-clipboard gives it the desktop
clipboard, reached as the + register ("+y, "+p). syn-edit about says
which of these are present on the machine it is run on.
curl -sL https://soslinux.org/synapseos-update-key.asc | gpg --import # once
git clone https://github.com/velle999/syn-edit
cd syn-edit && makepkg -simakepkg fetches the source for this PKGBUILD's exact version from this
repository's releases, so a clone can only ever build the source it was
written against. .SRCINFO lists what it needs.
The source is signed with the SynapseOS update key, and makepkg refuses it unless the signature is good. The fingerprint is in SECURITY.md.
Developed in the SynapseOS monorepo,
in syn-edit/. This repository is generated from it — the PKGBUILD, a
generated .SRCINFO and this README — so issues and patches belong there.
syn-edit 0.1.0-27 · GPL-2.0-or-later