cargo run -- --gui # GUI mode (stub, not yet implemented)
cargo clippy # Lint
cargo test# Run tests (no test suite yet)
```
Logs are written to `./pane-editor.log` via tracing-appender.
## Architecture
This is a Rust terminal text editor built with ratatui/crossterm, using an action-based state machine pattern. The editor core is designed to be frontend-agnostic.
### Key Layers
**Input Pipeline:** Keyboard events (crossterm) → `Input` enum → `Configuration` maps Input to `EditorAction` based on current `Mode` → `EditorCore::handle_action()` processes state changes.
**EditorCore** (`src/core.rs`): Central state manager. Owns all buffers (`HashMap<BufferId, Buffer>`), pane layout, mode (Normal/Insert/Command), and command system. All state mutations flow through `handle_action(EditorAction)`.
**EditorAction** (`src/core/actions.rs`): Enum representing every possible state change — character insertion, cursor movement, mode transitions, file I/O, commands, etc.
**TerminalUI** (`src/tui.rs`): Async event loop using tokio. Dual-rate rendering: 30 FPS while typing, 2 FPS when idle (0.5s threshold).
**Rendering** (`src/tui/render/`): Three-area vertical layout — main editing area, info pane (2 lines), command pane (1 line). Supports floating panes for popups (Help, Finder).
### Core Modules
-`src/core/buffer.rs` — TextBuffer (editable text backed by `crop::Rope` via TextLines wrapper) and FinderBuffer (WIP)
-`src/core/cursor.rs` — Cursor position tracking with UTF-8/grapheme-aware movement