Micro is a terminal-based text editor written in Go, designed to be intuitive and feature-rich. It provides a full editing experience with multiple cursors, tabs, splits, syntax highlighting, undo/redo, search/replace, autocomplete, and a built-in command bar. The architecture follows a modular design with clear separation of concerns: the `internal/action` package handles keybindings and event dispatching via a trie-based key tree; `internal/buffer` manages text buffers using an efficient line array and an event-driven undo stack; `internal/display` renders the editor UI through a window abstraction that supports soft wrapping and status lines; and `internal/screen` wraps the tcell library for terminal I/O. The editor supports Lua-based plugins that hook into lifecycle events and expose Go standard library packages, enabling extensibility without recompilation. External dependencies include tcell (terminal control), gopher-lua (scripting), go-diff (diff computation), and several forked libraries for JSON5 parsing and shell quoting. The main entry point is `cmd/micro/micro.go`, which parses CLI flags, initializes configuration, loads plugins, and runs the event loop. Data flows primarily involve file I/O (reading/writing buffers), terminal input events (keyboard/mouse), and plugin callbacks. The codebase is well-tested with unit tests, generated buffer tests from VSCode model tests, and CI pipelines across platforms.
ov is a feature-rich terminal pager written in Go, designed as a modern replacement for less/more. It supports large files via chunked reading with memory limits, ANSI escape sequence rendering, column alignment, word wrapping, search (case-insensitive, regex), follow/watch modes, multiple documents, sidebar panels (help, marks, doc list, sections, styles), mouse support, and extensive keybinding customization. The architecture is a single binary with a core `oviewer` package handling document management, screen drawing, event processing, and input modes. It uses `tcell` for terminal UI, `cobra` for CLI, `viper` for configuration, and supports compressed files (gzip, bzip2, zstd, lz4, xz). The codebase is well-tested with over 100 test files and demonstrates solid engineering practices including reusable patterns for bidirectional maps, ordered maps, converters, and input handling.