一款莲花1-2-3风格的终端电子表格,具有现代Excel兼容性。
L123: A Lotus 1-2-3–style terminal spreadsheet with modern Excel compatibility

原始链接: https://github.com/duane1024/l123

## l123:对 Lotus 1-2-3 的现代诠释 l123 是一款基于终端的电子表格应用程序,旨在重现 DOS 版 Lotus 1-2-3 Release 3.4a 的体验,同时利用现代技术。它使用 Rust 和 IronCalc 引擎构建,提供原生 .xlsx 兼容性,并采用键盘优先的工作流程和熟悉的斜杠菜单界面。 目前正在积极开发中(已达到里程碑 M10),l123 具有 3D 工作表、命名范围、撤销功能、打印到各种格式以及一个功能齐全的图形库等功能。它甚至包含一个支持鼠标的所见即所得图标面板,镜像了原始 1-2-3 的布局。 主要功能包括 1-2-3 公式语法、三行控制面板和广泛的键盘快捷键。l123 并非模拟器,而是优先考虑对原始版本的函数保真度,确保有经验的用户可以直观地操作它。该项目强调严格的测试和文档,专注于真实性和与现代电子表格格式的干净往返兼容性。 源代码和详细文档可在 GitHub 上找到:[https://github.com/duane1024/l123](https://github.com/duane1024/l123)。

一个类似于 Lotus 1-2-3 但兼容现代 Excel 的新终端电子表格已在 Hacker News 上分享([https://github.com/duane1024](https://github.com/duane1024))。作者 duane1024 受怀旧情绪启发,特别是 Lotus 1-2-3 *和* WordPerfect。 讨论很快转向了对基于终端的 WordPerfect 替代品的需求。虽然没有直接替代品,但用户建议使用 Visidata 进行数据处理,并使用 LaTeX 等格式化工具与 Vim 结合,以获得类似“显示代码”的体验。 Duane1024 承认自己喜欢 WordPerfect 5.1 并考虑重制它,但担心项目的范围。该帖子还提醒大家 YC 2026 夏季批次的申请正在开放。
相关文章

原文

A Lotus 1-2-3–style terminal spreadsheet with modern Excel compatibility.

l123 recreates the classic DOS-era spreadsheet experience — slash menus, three-line control panel, keyboard-first workflows, WYSIWYG icon panel, and all — on top of a modern formula engine with native .xlsx round-trip.

Its interaction model targets Lotus 1-2-3 Release 3.4a for DOS (1993). Its compute and I/O layers are Rust, IronCalc, and UTF-8.

l123 running in iTerm


Actively developed. Tracking the milestone plan in docs/PLAN.md:

Milestone Scope State
M0 Grid, pointer nav, workspace bring-up ✅ done
M1 Control panel, modes, first-char input ✅ done
M2 Engine wire-up, formulas, recalc ✅ done
M3 Menu system and MVP slash commands ✅ done
M4 .xlsx and CSV round-trip ✅ done
M5 3D sheets, GROUP, named ranges, undo ✅ done
M6 Printing (ASCII, PDF, line-printer) and Range Search ✅ done
M7 Graphs: 7 chart types, F10 view, SVG/PNG save ✅ done
M8 R3.4 WYSIWYG icon panel with mouse support ✅ done
M9 Macros: /X, {BRANCH}, {IF}, Learn planned
M10 Polish: startup splash, context help, themes 🚧 in progress

API, keybindings, and file paths may still change before v1.0.


Requires Rust stable (pinned via rust-toolchain.toml).

git clone [email protected]:duane1024/l123.git
cd l123
cargo build --release
./target/release/l123            # or: cargo run -p l123

Open an existing workbook:

Inspect or initialize configuration:

l123 config            # show effective settings and their sources
l123 config --init     # write a sample ~/.l123/L123.CNF

See docs/CONFIG.md for the full list of keys and environment variables.


✦ Keyboard, the short version

The keyboard is the product.

Key What it does
/ Open the slash menu
First letter Descend into a menu item (no Enter needed)
Arrows / Tab Move pointer; during entry, commit-and-move
Enter Commit cell entry
Esc Back out one level (menu, prompt, POINT anchor)
Ctrl-Break Abort to READY from anywhere
. (in POINT) Cycle which corner of the range is anchored
F1 Context help
F2 Edit current cell
F3 List named ranges
F4 Cycle $ absoluteness in a reference
F5 GOTO cell
F9 Recalculate
F10 Full-screen graph view
Alt-F4 Undo
Ctrl-PgUp / Ctrl-PgDn Previous / next sheet

Mouse is supported for the WYSIWYG icon panel (17 icons, R3.4a layout).

Formulas use 1-2-3 syntax: @SUM(A1..A5), not =SUM(A1:A5). The @ sigil and .. separator are required. #AND#, #OR#, #NOT# are the logical operators.

First character typed in READY decides label vs. value: digits and + - . ( @ # $ start a value; anything else starts a label (with an auto-inserted ' prefix). " = right-align, ^ = center, \- fills the cell with dashes.


  • Three-line control panel with live mode indicator
  • 13 modes (READY, LABEL, VALUE, EDIT, POINT, MENU, FILES, NAMES, HELP, ERROR, WAIT, FIND, STAT)
  • Full slash-menu tree: every path in docs/MENU.md is reachable; MVP leaves execute, non-MVP leaves show "Not implemented yet" in line 3
  • /Worksheet, /Range, /Copy, /Move, /File, /Quit MVP slices
  • .xlsx round-trip through IronCalc; .csv import and export
  • 3D workbooks: A..IV sheets, A:B3..C:D5 ranges, GROUP mode
  • Named ranges, @ function MVP set (see docs/SPEC.md §15)
  • Command-journal undo, toggleable via /WGD Other Undo
  • Multi-file sessions (/File Open Before|After, Ctrl-End navigation)
  • /Print File to ASCII, PDF, or line-printer output; headers, footers, margins, page-length, formatted / unformatted / as-displayed / cell-formulas modes; | in first column hides rows from print
  • /Range Search Formulas|Labels|Both Find and Replace
  • /Graph tree: Line, Bar, XY, Stack, Pie, HLCO, Mixed; Titles, Legend, Scale, Grid, Color/B&W, Data-Labels
  • F10 / /Graph View full-screen rendering with Unicode bar + line output; Kitty / iTerm2 / Sixel image support via ratatui-image
  • /Graph Save to SVG (and plotters PNG output for all chart types)
  • R3.4a WYSIWYG icon panel: all 17 icons, mouse-wired
  • Startup splash screen
  • Column-width options (/WGC, range-level set/reset)
  • Context help (F1), CRT themes, LMBCS compose key (M10, active)
  • /Data tree: Fill, Sort, Query, Table, Distribution, Regression, Parse
  • Macros: /X, {BRANCH}, {IF}, {MENUBRANCH}, /Worksheet Learn
  • .wk3 read-only import (values)

Rust workspace, strict layering:

l123-core  ← types only, zero external deps
  ↑
l123-parse, l123-menu
  ↑
l123-engine           (wraps IronCalc behind a trait)
  ↑
l123-cmd, l123-io, l123-graph, l123-print
  ↑
l123-ui               (ratatui + crossterm; engine-agnostic)
  ↑
l123                  (binary)

IronCalc is behind the Engine trait so it can be swapped. 1-2-3 formula syntax (@SUM, .., #AND#) is translated to Excel syntax in l123-parse before it reaches the engine. The UI never sees IronCalc types.


✦ Authenticity contract

l123 makes two promises (docs/SPEC.md §1):

  1. An experienced 1-2-3 R3.4a user can drive l123 cold, without reading anything.
  2. Files round-trip cleanly to and from .xlsx.

SPEC §20 enumerates the behaviors — three-line control panel, menu accelerators, POINT anchor semantics, first-char rule, @ sigil, format tags, commit-on-arrow, WYSIWYG icon panel, and so on — that the project fails if it misses. Every item in the contract has at least one acceptance transcript under tests/acceptance/.


Strict red / green / refactor. Conventions live in CLAUDE.md.

cargo test --workspace                                  # all tests
cargo test -p l123-ui --test acceptance                 # keystroke transcripts
cargo clippy --workspace --all-targets -- -D warnings   # lint
cargo fmt --all                                         # format

Acceptance transcripts are .tsv files describing keystrokes in and screen state out; see tests/acceptance/README.md for the directive syntax. Every UI-visible change lands with a transcript.

Canonical docs (treat as sources of truth):

If code and doc disagree, fix the doc first.


  • Not a DOS emulator. No INT21h, no code pages. Strings are UTF-8.
  • Not a visual homage. Functional fidelity, not CRT nostalgia. (Green / amber themes are a stretch goal, not the point.)
  • Not a macro player for existing .WK3 files. Read-only .WK3 import is a stretch goal; write is not planned.
  • Not a reimplementation of the 1-2-3 compute core. IronCalc does that.
  • Not aimed at Lotus 1-2-3 for Windows or SmartSuite. Release 3.4a for DOS only.

Spreadsheets didn't get worse — they just got heavier.

l123 brings back the speed, clarity, and keyboard-driven precision of early spreadsheet software, without sacrificing compatibility with modern workflows.


Because the / key was never the problem.


Licensed under the MIT License. See LICENSE.

联系我们 contact @ memedata.com