KTE(1)

NAME
kte - Kyle's Text Editor (terminal-first)

SYNOPSIS
kte [ options ] [ files ... ]

DESCRIPTION
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 --gui or by invoking the GUI-first target kge(1) when available. If one or more files are provided, they are opened on startup; otherwise, an empty buffer is created.

OPTIONS

-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.

-t, --term
    Use the terminal (ncurses) frontend. This is the default for kte

-h, --help
    Display a brief usage summary and exit.

-V, --version
    Print version information and exit.

KEYBINDINGS
The command model and keybindings are inherited from ke and are summarized here for convenience. See docs/ke.md in the source tree for the canonical reference and notes.

  K-commands (prefix Ctrl-K)

Enter K-command mode with Ctrl-K. Exit K-command mode with ESC or Ctrl-G.

C-k '
    Toggle read-only for the current buffer.

C-k -
    If the mark is set, unindent the region.

C-k =
    If the mark is set, indent the region.

C-k ;
    Open the generic command prompt (": ").

C-k a
    Set the mark at the beginning of the file, then jump to the end of the file.

C-k b
    Switch to a buffer.

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.

C-k d
    Delete from the cursor to the end of the line.

C-k C-d
    Delete the entire line.

C-k e
    Edit (open) a new file.

C-k f
    Flush the kill ring.

C-k g
    Go to a specific line.

C-k h
    Show the built-in help (+HELP+ buffer).

C-k j
    Jump to the mark.

C-k l
    Reload the current buffer from disk.

C-k n
    Switch to the previous buffer.

C-k o
    Change working directory (prompt).

C-k p
    Switch to the next buffer.

C-k q
    Exit the editor. If the file has unsaved changes, a warning will be printed; a second C-k q will exit.

C-k C-q
    Immediately exit the editor.

C-k r
    Redo changes.

C-k s
    Save the file, prompting for a filename if needed.

C-k u
    Undo.

C-k v
    Toggle visual file picker (GUI).

C-k w
    Show the current working directory.

C-k x
    Save the file and exit. Also C-k C-x.

C-k y
    Yank the kill ring.

C-k C-x
    Save the file and exit.

GUI APPEARANCE
When running the GUI frontend, you can control appearance via the generic command prompt (type "C-k ;" then enter commands):

: theme NAME
    Set the GUI theme. Available names: "amber", "eink", "everforest", "gruvbox", "kanagawa-paper", "lcars", "nord", "old-book", "orbital", "plan9", "solarized", "weyland-yutani", "zenburn". Compatibility aliases are also accepted: "gruvbox-dark", "gruvbox-light", "solarized-dark", "solarized-light", "eink-dark", "eink-light", "everforest-hard", "oldbook", "old-book-dark", "old-book-light", "kanagawa", "kanagawa-light", "kanagawa-paper-light", "vim-amber", "weyland".

: background MODE
    Set background mode for supported themes. MODE is either "light" or "dark". Themes that respond to background: eink, gruvbox, kanagawa-paper, old-book, solarized. The "lcars", "nord" and "plan9" themes do not vary with background.

CONFIGURATION
The GUI reads a simple configuration file at ~/.config/kte/kge.ini. Recognized keys include:

fullscreen=on|off

columns=NUM

rows=NUM

font_size=NUM

theme=NAME

background=light|dark
    The theme name accepts the values listed above. The background key controls light/dark variants when the selected theme supports it.

  Other keybindings

C-g Cancel the current operation.

C-a Move to the beginning of the line.

C-e Move to the end of the line.

C-b Move left.

C-f Move right.

C-n Move down.

C-p Move up.

C-l Refresh the display.

C-d Delete the character at the cursor.

C-r Regex search.

C-s Incremental find.

C-t Regex search and replace.

C-h Search and replace.

C-u Universal argument. C-u followed by numbers will repeat an operation n times.

C-w Kill the region if the mark is set.

C-y Yank the kill ring.

ESC <
    Move to the beginning of the file.

ESC >
    Move to the end of the file.

ESC m
    Toggle the mark.

ESC BACKSPACE
    Delete the previous word.

ESC b
    Move to the previous word.

ESC d
    Delete the next word.

ESC f
    Move to the next word.

ESC q
    Reflow the paragraph to 72 columns or the value of the universal argument.

ESC w
    Save the region (if the mark is set) to the kill ring.

ENVIRONMENT

TERM
    Specifies terminal type and capabilities for ncurses.

LANG, LC_ALL, LC_CTYPE
    Determine locale and character encoding.

FILES

~/.kte/
    Future configuration directory (not yet stabilized).

EXIT STATUS
Returns 0 on success, non-zero on failure.

EXAMPLES

Edit a file in the terminal (default):
      kte README.md

Force GUI frontend (if available):
      kte --gui main.cc

SEE ALSO
kge(1), docs/ke.md (project keybinding manual)
Project homepage: https://github.com/wntrmute/kte

AUTHORS
Kyle (wntrmute) and contributors.

COPYRIGHT
Copyright © 2025 Kyle. License as per project repository.

NOTES
This page documents kte version 0.1.0.