

























a tiny editor for people who think F2 should format code.
Terminal-first, browser-curious, and extension-friendly. It edits files, searches text, undoes mistakes, follows the mouse, and lets shell scripts borrow the whole buffer for one-key tricks.
tty://catbath
scroll for the tiny manual
terminal mode
Open a file, stay in the shell, edit without inviting a desktop-sized IDE.
browser mode
Use -w when a textarea and a tab are the correct amount of UI.
remote files
Point at ssh://user@host/path/file.txt when the file lives elsewhere.
# build it $ cargo build --release # or install it $ yay -S catbath # open something suspicious $ catbath -w src/main.rs
^Qquit
^Ssave
^Zundo
^Kcut
^Upaste
^Fsearch
F1..F12run extension
mouseclick + scroll
tiny config
Syntax files are plain text: keywords, types, comments, and string delimiter.
local first
Put overrides in ~/.config/catbath/syntax.
packaged defaults
catbath also checks /usr/share/catbath/syntax.
# Python-ish goggles $ mkdir -p ~/.config/catbath/syntax $ printf '%s\n' 'keywords: def class return import if else' 'comment: #' 'string: "' > ~/.config/catbath/syntax/py
stdin in
The whole buffer is piped into your script.
stdout out
Print the edited buffer back, and catbath swaps it in.
context included
Scripts get file path, row, and column as environment variables.
# F2: format code with rustfmt $ mkdir -p ~/.config/catbath/extensions $ printf '%s\n' '#!/bin/sh' 'rustfmt --emit stdout' > ~/.config/catbath/extensions/F2 $ chmod +x ~/.config/catbath/extensions/F2
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。