redit is a terminal markdown editor built with Rust + Ratatui.
It provides a multi-pane TUI with a file explorer, markdown-aware editor, optional split markdown preview, integrated terminal pane, menu bar, and popup-driven workflows.
- Top menus:
File,Edit,Search,View,Tools,Help - File explorer pane (left):
- Tree view for directories/files
- Expand/collapse directories
- Double-click support for open/toggle
- Reliable mouse selection across the full explorer pane while terminal pane is visible
- Editor pane (center/right):
- Line numbers
- Markdown syntax highlighting (
.md,.markdown, etc.) - Code/config syntax highlighting in edit pane for many file types via Syntect (for example Python, JavaScript, TypeScript, Go, Rust, TOML, YAML,
.env) - Markdown list auto-continuation on
Enter - Mouse text selection (drag)
- Markdown preview:
View | Markdowntoggle- Split preview mode with Glow rendering when available
- Fallback renderer if Glow is not installed
- Terminal pane:
View | Terminaltoggle- Persistent bottom pane under editor
- Interactive command input/output
- Search and replace popups:
Search | FindSearch | Replacesupports replace-next (one by one) with remaining count
- File operations:
File | SaveFile | Save As...popup with editable path field
- Theme palette:
Tools | Palette- 5 themes (including
Black & White) - Keyboard and mouse selection in palette popup
- Palette is persisted across restarts
- Help popups:
Help | KeybindingsHelp | About redit
Install Rust from https://rustup.rs (recommended and required for build/deploy).
Then verify:
rustc --version
cargo --version- Linux: install compiler/linker toolchain (for example
build-essentialon Debian/Ubuntu) - macOS: install Xcode Command Line Tools (
xcode-select --install) - Windows: install Visual Studio Build Tools (C++ workload)
Glow powers high-quality markdown preview output. Without Glow, redit falls back to a simpler preview renderer.
Verify installation:
glow --versionCommon install options:
- macOS (Homebrew):
brew install glow- Windows (Scoop):
scoop install glow- Windows (Chocolatey):
choco install glow- Linux:
- Use your distro package manager if available, or
- Download a release package from Glow's GitHub releases
git clone <your-repo-url> redit
cd reditcargo buildBinary location:
- Linux/macOS:
target/debug/redit - Windows:
target\debug\redit.exe
cargo run -- path/to/file.mdIf no file is provided, redit starts with an empty buffer.
cargo build --releaseRelease binary:
- Linux/macOS:
target/release/redit - Windows:
target\release\redit.exe
install -Dm755 target/release/redit ~/.local/bin/reditMake sure ~/.local/bin is in your PATH.
- The produced binary targets the platform you build on by default.
- To build for another target, add Rust target(s) first:
rustup target add x86_64-pc-windows-gnu
rustup target add x86_64-unknown-linux-gnuThen build with --target:
cargo build --release --target x86_64-pc-windows-gnuPalette selection is stored in:
$XDG_CONFIG_HOME/redit/settings.conf(ifXDG_CONFIG_HOMEis set), or~/.config/redit/settings.conf
F1: Help keybindings popupF2: focus/toggle explorer paneF3: toggle terminal paneCtrl-S: saveCtrl-Shift-S: save asCtrl-Q: quit (double press if unsaved changes)Ctrl-P: toggle split markdown previewCtrl-F: find popupCtrl-R: replace popupCtrl-Z/Ctrl-Y: undo / redoCtrl-X/Ctrl-C/Ctrl-V: cut / copy / pasteAlt-F,Alt-E,Alt-S,Alt-V,Alt-T,Alt-H: open menus
Menu navigation:
Left/Right: switch menusUp/Down: move menu selectionEnter: activate menu actionEsc: close menu/popup
- Click top menu labels to open dropdowns
- Click dropdown items to execute actions
- File explorer double-click opens files and expands/collapses directories
- Drag in editor to select text
- Palette popup supports mouse click selection and apply
cargo run -- notes.mdThen try:
View | MarkdownView | TerminalTools | PaletteSearch | Replace
