Skip to main content

Femto v0.0.2

Femto is a tiny, nano-style terminal text editor written in pure Python. It ships with zero runtime dependencies on POSIX system (standard-library curses only) and automatically pulls windows-curses on Windows.

Femto supports multi-buffer editing, soft line wrapping, syntax highlighting, regex search & replace, mouse support, and is fully Unicode (CJK/Emoji) aware.

Install

# From PyPI (Recommended)
pipx install femto-editor
# or
pip install femto-editor

# From source
git clone https://github.com/codewithzaqar/femto.git
cd femto
pip install .

After installation, the femto command is available globally.

Usage

femto [file ...]        # open one or multiple files
femto --line-numbers a.py x.py
femto --tab-size 2 --regex x.py
femto --version

Keybindings

Key Action Key Action
Ctrl+X Exit (asks to save) Ctrl+W Search / find next
Ctrl+S Save (Save-As if unnamed) Ctrl+T Go to line
Ctrl+Z/Ctrl+Y Undo / Redo Ctrl+G/Esc Cancel prompt
Arrows Move Ctrl+<-/-> Word jump
Home/End, Ctrl+A/E Line start/end PgUp/PgDn Page scroll
Tab/Shift+Tab Indent / unindent Enter New line
Ctrl+B Set / clear mark Ctrl+K Cut line or selection
Ctrl+P Copy line or selection Ctrl+U Paste clipboard
Ctrl+\ Replace (search -> with -> Y/N/A/C) Ctrl+O Toggle case-insensitive (in search prompt)
Ctrl+R Toggle regex mode (in search prompt)
Ctrl+N Toggle line numbers
Ctrl+D Toggle mouse support Mouse wheel Scroll viewport
Ctrl+F / Ctrl+L Next / previous buffer
Mouse click Move cursor to click point

Configuration (~/.femtorc or ./.femtorc)

Femto is highly customizable via a simple key = value configuration file.

# Indentation
tab_size = 4

# Viewport
smooth_scroll_margin = 3
soft_wrap = true
show_line_numbers = false
syntax_highlight = true

# Search
ignore_case = false
regex_search = false

# Input & I/O
mouse = false
make_backup = false

Running the tests

Femto includes a comprehensive unittest regression suite that runs headlessely (no terminal required).

python -m unittest discover -s tests -v

Building a release

pip install build twine
python -m build          # creates dist/femto_editor-0.0.1-*.whl
python -m twine upload dist/* # publish to PyPI

License

MIT - see LICENSE.

Metadata

Release files for femto-editor 0.0.2

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

Source distribution (sdist)

Source distribution for femto-editor 0.0.2
File Size Uploaded
femto_editor-0.0.2.tar.gz 27.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for femto-editor 0.0.2
File Interpreter ABI Platform
femto_editor-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 53.0 kB

Release files / femto_editor-0.0.2.tar.gz

Download URL femto_editor-0.0.2.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5a7f3215d80c1ff860950f20d867a324e37cb03e6dbe31461847be58fc52300a
BLAKE2b-256 checksum
How to use checksums
8b9be1d8b8d546690afe5020780374954e569b0e6194a303ecf40d20f3e9f397
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / femto_editor-0.0.2-py3-none-any.whl

Download URL femto_editor-0.0.2-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
984d5e58305a2c924d8a819d3f1b9affeef41516fde5f0f4020506ed11e57d18
BLAKE2b-256 checksum
How to use checksums
a6fa6de074008d59423b2f161740f8d9bbaebd95706a516cbffb7af73f48b556
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

0.0.3

2 release files

This release

0.0.2 This release

2 release files

0.0.1

2 release files

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