# edit(1)

    NAME
        edit - text editor for MontaukOS

    SYNOPSIS
        edit [filename]

    DESCRIPTION
        edit is an interactive text editor. When invoked with a filename,
        it opens the file for editing. If the file does not exist, a new
        empty buffer is created and will be saved to that path on write.

        When invoked without arguments, edit opens an empty buffer. You
        will be prompted for a filename when saving.

    KEYBOARD SHORTCUTS

       Navigation
        Arrow Keys      Move cursor up/down/left/right
        Home            Move to start of line
        End             Move to end of line
        Page Up         Scroll up one page
        Page Down       Scroll down one page

       Editing
        Backspace       Delete character before cursor
        Delete          Delete character at cursor
        Enter           Insert new line
        Tab             Insert 4 spaces

       Commands
        Ctrl+S          Save file
        Ctrl+Q          Quit (warns if unsaved changes)
        Ctrl+F          Search for text
        Ctrl+G          Find next occurrence

    DISPLAY
        The top line shows the filename, a modified indicator [+],
        and the current cursor position (Ln, Col).

        The bottom line shows keyboard shortcuts or status messages.

        Line numbers are displayed in a gutter on the left side.
        Lines past the end of the file are marked with ~.

    EXAMPLES
        edit intro.1            Edit a file
        edit                    Open a new empty buffer

    SEE ALSO
        cat(1), shell(1)

Back to Documentation Index