Files
kte/docs/kte.1
Kyle Isom fb5976f123
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
Add buffer position display and documentation improvements.
- Display buffer position prefix "[x/N]" in GUI and terminal renderers.
- Improve `kte` and `kge` man pages with frontend usage details and project homepage.
- Update README with GUI invocation instructions.
- Bump version to 1.0.0.
2025-11-30 18:40:44 -08:00

215 lines
4.2 KiB
Groff

.\" kte(1) — Kyle's Text Editor (terminal-first)
.\"
.\" Project homepage: https://github.com/wntrmute/kte
.TH KTE 1 "2025-11-30" "kte 0.1.0" "User Commands"
.SH NAME
kte \- Kyle's Text Editor (terminal-first)
.SH SYNOPSIS
.B kte
[
.I options
]
[
.I files ...
]
.SH DESCRIPTION
.B kte
is a small, fast, and understandable text editor with a terminal-first
experience. It preserves ke's WordStar/VDE-style command model with
Emacs-influenced ergonomics. The core uses ncurses in the terminal.
By default, .B kte
runs in the terminal (ncurses) frontend. If the binary was built with GUI
support, the same editor core can be shown with an ImGui-based GUI by passing
.B --gui
or by invoking the GUI-first target
.BR kge (1)
when available.
If one or more
.I files
are provided, they are opened on startup; otherwise, an empty buffer is
created.
.SH OPTIONS
.TP
.B -g, --gui
Use the GUI frontend (if the binary was built with GUI support). If GUI was
not built, the editor exits with an error.
.TP
.B -t, --term
Use the terminal (ncurses) frontend. This is the default for
.B kte
.
.TP
.B -h, --help
Display a brief usage summary and exit.
.TP
.B -V, --version
Print version information and exit.
.SH KEYBINDINGS
The command model and keybindings are inherited from
.I ke
and are summarized here for convenience. See
.I docs/ke.md
in the source tree for the canonical reference and notes.
.SS K-commands (prefix Ctrl-K)
.PP
Enter K-command mode with Ctrl-K. Exit K-command mode with ESC or Ctrl-G.
.TP
.B C-k BACKSPACE
Delete from the cursor to the beginning of the line.
.TP
.B C-k SPACE
Toggle the mark.
.TP
.B C-k -
If the mark is set, unindent the region.
.TP
.B C-k =
If the mark is set, indent the region.
.TP
.B C-k a
Set the mark at the beginning of the file, then jump to the end of the file.
.TP
.B C-k b
Switch to a buffer.
.TP
.B C-k c
Close the current buffer. If no other buffers are open, an empty buffer will be opened. To exit, use C-k q.
.TP
.B C-k d
Delete from the cursor to the end of the line.
.TP
.B C-k C-d
Delete the entire line.
.TP
.B C-k e
Edit a new file.
.TP
.B C-k f
Flush the kill ring.
.TP
.B C-k g
Go to a specific line.
.TP
.B C-k j
Jump to the mark.
.TP
.B C-k l
Reload the current buffer from disk.
.TP
.B C-k m
Run make(1), reporting success or failure.
.TP
.B C-k p
Switch to the next buffer.
.TP
.B C-k q
Exit the editor. If the file has unsaved changes, a warning will be printed; a second C-k q will exit.
.TP
.B C-k C-q
Immediately exit the editor.
.TP
.B C-k s
Save the file, prompting for a filename if needed.
.TP
.B C-k u
Undo.
.TP
.B C-k r
Redo changes.
.TP
.B C-k x
Save the file and exit. Also C-k C-x.
.TP
.B C-k y
Yank the kill ring.
.TP
.B C-k \e
Dump core.
.SS Other keybindings
.TP
.B C-g
Cancel the current operation.
.TP
.B C-l
Refresh the display.
.TP
.B C-r
Regex search.
.TP
.B C-s
Incremental find.
.TP
.B C-u
Universal argument. C-u followed by numbers will repeat an operation n times.
.TP
.B C-w
Kill the region if the mark is set.
.TP
.B C-y
Yank the kill ring.
.TP
.B ESC BACKSPACE
Delete the previous word.
.TP
.B ESC b
Move to the previous word.
.TP
.B ESC d
Delete the next word.
.TP
.B ESC f
Move to the next word.
.TP
.B ESC q
Reflow the paragraph to 72 columns or the value of the universal argument.
.TP
.B ESC w
Save the region (if the mark is set) to the kill ring.
.SH ENVIRONMENT
.TP
.B TERM
Specifies terminal type and capabilities for ncurses.
.TP
.B LANG, LC_ALL, LC_CTYPE
Determine locale and character encoding.
.SH FILES
.TP
.I ~/.kte/
Future configuration directory (not yet stabilized).
.SH EXIT STATUS
Returns 0 on success, non-zero on failure.
.SH EXAMPLES
.TP
Edit a file in the terminal (default):
.RS
.nf
kte README.md
.fi
.RE
.TP
Force GUI frontend (if available):
.RS
.nf
kte --gui main.cc
.fi
.RE
.SH SEE ALSO
.BR kge (1),
.I docs/ke.md
(project keybinding manual)
.br
Project homepage: https://github.com/wntrmute/kte
.SH BUGS
Incremental search currently restarts from the top on each invocation; see
\(lqKnown behavior\(rq in the ke manual. Report issues on the project tracker.
.SH AUTHORS
Kyle (wntrmute) and contributors.
.SH COPYRIGHT
Copyright \(co 2025 Kyle. License as per project repository.
.SH NOTES
This page documents kte version 0.1.0.