-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
This page walks you through your first session with edit: launching it, touring the DOS-style
interface, and running the open β edit β save β quit loop.
# A blank buffer
edit
# Open an existing file
edit notes.txtIf you ran edit previously and exited cleanly, you may be greeted by a session restore prompt
offering to reopen your last set of files. Press Y/Enter to restore or N/Esc to start fresh.
To skip this prompt entirely, launch with --no-session. (Passing explicit file arguments also
bypasses session restore.)
edit recreates the classic EDIT.COM screen. From top to bottom:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β File Edit Search View Options Help β β Menu bar
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Hello, world! β
β This is the editor area on a DOS-blue background. β
β Unicode works everywhere: cafΓ©, Ξ±Ξ²Ξ³, ζ₯ζ¬θͺ, π β
β β β β Cursor
β β
β β
β β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β notes.txt UTF-8 LF Ln 4, Col 1 [+] β β Status bar
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-
Menu bar (top) β
File,Edit,Search,View,Options,Help. PressF10to activate it, orAlt+<first letter>to drop a menu open directly (e.g.Alt+Ffor File). Plugin-provided menus appear betweenOptionsandHelp. Menus are fully mouse-operable β click a title to open it and click an item to run it. -
Buffer tab bar (below the menu bar) β appears when two or more buffers are open: a one-row
strip listing each open file (active tab highlighted, a
βmarks unsaved buffers). Click a tab to switch to it, or click itsβto close it. With a single buffer there is no tab bar. -
Editor area (middle) β your text, on the classic blue background under the
classictheme. An optional line-number gutter can be enabled. The current selection is shown highlighted (reverse video), and scrollbars appear when the content overflows. -
Status bar (bottom) β filename, current encoding (e.g.
UTF-8), line-ending style (LF/CRLF), cursor position, and transient indicators such as[WRAP](soft-wrap on) or a[+]/dirty marker for unsaved changes. Search results, save confirmations, and plugin messages also flash here.
edit is fully mouse-operable (on any terminal that reports mouse events; everything also works from
the keyboard). Click to position the cursor, press-drag-release to select, double-click to select a
word, triple-click to select a line, and right-click for a Cut / Copy / Paste / Select All context menu.
The wheel scrolls the editor, file browser, Help/About, and list dialogs, and the scrollbars are
clickable and draggable. Mouse support can be turned off with mouse = false in config.toml.
-
Ctrl+Oopens the file dialog, or - pass the filename on the command line:
edit path/to/file.
Type to insert. Editing is grapheme-aware, so multi-codepoint characters behave as single units.
| Action | Key |
|---|---|
| Undo / Redo |
Ctrl+Z / Ctrl+Y
|
| Cut / Copy / Paste |
Ctrl+X / Ctrl+C / Ctrl+V
|
| Select all | Ctrl+A |
| Extend selection | Shift+Arrow |
| Extend selection by word |
Ctrl+Shift+Left / Ctrl+Shift+Right
|
| Delete previous / next word |
Ctrl+Backspace / Ctrl+Delete
|
| Indent / Dedent selection |
Tab / Shift+Tab
|
Arrow keys move the cursor. Home/End jump to line start/end; Ctrl+Home/Ctrl+End to
file start/end; Ctrl+Left/Ctrl+Right move by word; PgUp/PgDn page through the buffer.
-
Ctrl+Fβ Find (interactive dialog; regex supported, matches highlighted, "X of Y" indicator) -
F3/F2β Find next / previous (wraps) -
Ctrl+Hβ Find and Replace (interactive dialog) -
Ctrl+Gβ Go to Line (type a 1-based line number and pressEnterto jump)
-
Ctrl+S/F5β Save - File βΊ Save Asβ¦ β save to a new path (via the file browser)
-
F12β Save As Encoding (choose the output encoding from a dialog; see Encodings)
-
Ctrl+Qβ Quit. If the buffer has unsaved changes you'll be prompted before exiting.
- The complete key map: Keybindings
- Customize themes and behavior: Configuration
- Work with legacy code pages and UTF-16: Encodings
Using edit
Extending edit
Project