Skip to main content

A TUI markdown editor built with Textual (forked from Frogmouth)

Project description

TUI Markdown Editor

A terminal-based markdown editor built with Textual, forked from Frogmouth.

It keeps all of Frogmouth's excellent navigation, history, bookmarks, and scrolling Markdown preview — and adds an integrated editor so you can edit files right in the terminal.

Features

  • Full Frogmouth navigation — Omnibox address bar, sidebar with bookmarks/history/local files/table of contents
  • Scrollable Markdown preview — Proper scrolling with table of contents, link navigation, and history
  • Edit mode — Press Ctrl+E to switch from preview to a syntax-highlighted TextArea editor
  • Save — Press Ctrl+S to write changes back to disk
  • Dirty tracking — Know when you have unsaved changes
  • Remote URLs — Open Markdown files from the web (read-only)

Installation

Install the package into your virtual environment in editable mode:

pip install -e .

This installs the tui-md-editor CLI command.

Usage

Launch the editor with an optional starting file:

tui-md-editor
tui-md-editor ~/notes.md

Keybindings

Navigation (Frogmouth defaults)

Key Action
/ or : Focus the omnibox (address bar)
Ctrl+N Toggle navigation sidebar
Ctrl+Left Back in history
Ctrl+Right Forward in history
Ctrl+R Reload current document
Ctrl+B Show bookmarks
Ctrl+Y Show history
Ctrl+L Show local files
Ctrl+T Show table of contents
F1 Help
F2 About
Ctrl+Q Quit

Editing (new)

Key Action
Ctrl+E Toggle Edit / Preview mode
Ctrl+S Save the current file

Project Structure

This is a fork of Frogmouth with the following modifications:

  • src/tui_md_editor/widgets/viewer.py — Added TextArea editor inside a ContentSwitcher, plus toggle_edit() and save_file() methods
  • src/tui_md_editor/screens/main.py — Added Ctrl+E and Ctrl+S bindings wired to the Viewer
  • src/tui_md_editor/app/app.py — Updated entry point and branding
  • src/tui_md_editor/utility/advertising.py — Updated app title

Testing

pytest tests/ -v

License

MIT (inherits from Frogmouth)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tui_md_editor-0.1.0.tar.gz (10.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tui_md_editor-0.1.0-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file tui_md_editor-0.1.0.tar.gz.

File metadata

  • Download URL: tui_md_editor-0.1.0.tar.gz
  • Upload date:
  • Size: 10.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for tui_md_editor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 967db09b8408a157a6da555e9ea4aa4f93cbae1bd21828f1d9d370194448e9a3
MD5 8f83255abc0cfd0e866fbf866201af11
BLAKE2b-256 f14f2b93b2d572c7e3b872d810262977174db55722b593f2657d53f501214c81

See more details on using hashes here.

File details

Details for the file tui_md_editor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tui_md_editor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for tui_md_editor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3706ca4cecb697f5ba19806734d2f53222afde9f4c631689f7068de865ca5f38
MD5 02cec0f33305261c59eb937f426ca392
BLAKE2b-256 8f179b9251d83f3b8c550f835a94a79203a071038eaf9857717e419039248330

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page