Skip to main content

pen

A minimalist terminal text editor with live syntax highlighting, built on the ascii_colors TUI framework.

Designed as a friendly nano replacement on Windows (and everywhere else): system clipboard copy/paste, Save As, undo/redo, find, go-to-line, and detection of external file changes.

Install

pip install ascii-pen

Or, from a checkout of this directory:

pip install -e .

Usage

pen                     # start with an empty untitled document
pen path/to/file.py     # open an existing file, or create a new one
pen notes.md            # any text file works — not just Python

Controls

Key Action
Arrows, Home, End, PgUp, PgDn Move the cursor
Shift + arrows Extend the selection
Ctrl+A / Ctrl+B Select all / toggle the selection mark
Ctrl+C / Ctrl+X / Ctrl+V Copy / cut / paste (uses the OS clipboard)
Ctrl+Z / Ctrl+Y Undo / redo
Enter, Backspace, Delete, Tab Edit
Ctrl+S Save (prompts for a path if untitled)
F2 Save As…
Ctrl+O Open another file
Ctrl+N New buffer
F5 Reload from disk
Ctrl+F / Ctrl+G Find / go to line
F1 Shortcut help
Ctrl+Q Quit (asks before discarding changes)

Tab inserts an indent using the file's own convention (tabs if the file already uses tabs, otherwise spaces).

Features

  • Not Python-only. Highlighting is chosen from the file extension — Python, JavaScript/TypeScript, C/C++/C#/Java/Go/Rust, JSON, shell, TOML/INI/YAML — and falls back to plain text for anything else.
  • Real copy/paste. Uses the Windows clipboard (via ctypes), pbcopy / pbpaste on macOS, and xclip / xsel on Linux, with an in-process fallback when none is available.
  • External change detection. The buffer watches its file; if another program rewrites it, the status line warns, saving asks for confirmation, and F5 reloads.
  • Unsaved-change protection. Quitting, opening and creating buffers all ask before throwing work away.
  • Line-number gutter with the current line highlighted.
  • Vertical and horizontal scrolling driven by the cursor.
  • Wide-character aware rendering.

License

MIT

Metadata

Release files for ascii-pen 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ascii-pen 0.2.0
File Size Uploaded Provenance Actions
ascii_pen-0.2.0.tar.gz 18.4 kB Without provenance Details for ascii_pen-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ascii-pen 0.2.0
File Interpreter ABI Platform Actions
ascii_pen-0.2.0-py3-none-any.whl Python 3 none any Details for ascii_pen-0.2.0-py3-none-any.whl

Total release size: 37.5 kB

Release files / ascii_pen-0.2.0.tar.gz

Download URL ascii_pen-0.2.0.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
67b0f02be8b7fe515a02261e40805e970711a2d20ab0edbe1c334e1d472500ff
BLAKE2b-256 checksum
How to use checksums
aa10f50cab7aeef915b596a43f60a09f036320de79fcc7ac8d552a5199454ad2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

Release files / ascii_pen-0.2.0-py3-none-any.whl

Download URL ascii_pen-0.2.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
964ea192a28f95d9de976cf80d39f86001e47a7ecca154fdd789db71e53c6ecf
BLAKE2b-256 checksum
How to use checksums
4a2f247eb61e2dd1c1fb33b06600fcc91b01dfa0a44e9d7f0bf7e41b169ba367
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

Security for ascii-pen 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page