Files
ke/ke.1
Kyle Isom 734eb6e67d
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
ke version 2.0
- with multiple buffers
- some handy tab completion
- lots of cleanups
2025-11-28 02:52:24 -08:00

118 lines
3.0 KiB
Groff

.Dd $Mdocdate$
.Dt KE section
.Os
.Sh NAME
.Nm ke
.Nd Kyle's text editor.
.Sh SYNPOSIS
.Nm ke
.Op Ar files
.Sh DESCRIPTION
.Nm
is Kyle's text editor and is probably ill-suited to everyone else. It
was inspired by Antirez' kilo text editor by way of someone's writeup
of the process of writing a text editor from scratch. It has keybindings
inspired by VDE (and the Wordstar family) and emacs; its spiritual parent
is
.Xr mg 1 .
.Sh KEYBINDINGS
K-command mode is entered using C-k. This is taken from Wordstar and just
so happens to be blessed with starting with a most excellent letter of
grandeur. Many commands work with and without control; for example,
saving a file can be done with either C-k s or C-k C-s. Other commands work
with ESC or CTRL.
.Sh K-COMMANDS
k-command mode can be exited with ESC or C-g.
.Bl -tag -width xxxxxxxxxxxx -offset indent
.It C-k BACKSPACE
Delete from the cursor to the beginning of the line.
.It C-k SPACE
Toggle the mark.
.It C-k -
If the mark is set, unindent the region.
.It C-k =
If the mark is set, indent the region.
.It C-k b
Switch to a buffer.
.It 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.
.It C-k d
Delete from the cursor to the end of the line.
.It C-k C-d
Delete the entire line.
.It C-k e
Edit a new file. Also C-k C-e.
.It C-k f
Flush the kill ring.
.It C-k g
Go to a specific line.
.It C-k j
Jump to the mark.
.It C-k l
List the number of lines of code in a saved file.
.It C-k m
Run make(1).
.It C-k p
Switch to the next buffer.
.It C-k q
Exit the editor. If the file has unsaved changes,
a warning will be printed; a second C-k q will exit.
.It C-k C-q
Immediately exit the editor.
.It C-k C-r
Reload the current buffer from disk.
.It C-k s
Save the file, prompting for a filename if needed. Also C-k C-s.
.It C-k u
Undo changes (not implemented; marking this k-command as taken).
.It C-k U
Redo changes (not implemented; marking this k-command as taken).
.It C-k x
save the file and exit. Also C-k C-x.
.It C-k y
Yank the kill ring.
.It C-k \[char92]
Dump core.
.El
.Sh OTHER KEYBINDINGS
.Bl -tag -width xxxxxxxxxxxx -offset indent
.It C-g
In general, C-g cancels an operation.
.It C-l
Refresh the display.
.It C-s
Incremental find.
.It C-u
Universal argument. C-u followed by numbers will repeat an
operation n times.
.It C-w
Kill the region if the mark is set.
.It C-y
Yank the kill ring.
.It ESC BACKSPACE
Delete the previous word.
.It ESC b
Move to the previous word.
.It ESC d
Delete the next word.
.It ESC f
Move to the next word.
.It ESC w
Save the region (if the mark is set) to the kill ring.
.It
.El
.Sh FIND
The find operation is an incremental search. The up or left arrow keys will
go to the previous result, while the down or right arrow keys will go to
the next result. Unfortunately, the search starts from the top of the file
each time. This is a known bug.
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr mg 1
.Sh AUTHORS
.An Kyle Isom Aq Mt kyle@imap.cc
.Sh CAVEATS
This is pretty buggy and will probably eat whatever you type.