| Crates.io | uemacs |
| lib.rs | uemacs |
| version | 0.4.0 |
| created_at | 2026-01-15 00:01:39.243009+00 |
| updated_at | 2026-01-18 11:28:18.115429+00 |
| description | A uEmacs/PK text editor written in Rust |
| homepage | https://crates.io/crates/uemacs |
| repository | https://github.com/ali-raheem/uemacs.rs |
| max_upload_size | |
| id | 2044220 |
| size | 412,539 |
A complete loose re-write in Rust of uEmacs/PK, the lightweight Emacs-style text editor. Mostly vibe coded with Claude Code.
cargo install uemacs
git clone https://github.com/ali-raheem/uemacs.rs.git
cd uemacs.rs
cargo build --release
# Open a file
uemacs filename.txt
# Or run without a file (starts with *scratch* buffer)
uemacs
# Show help
uemacs --help
If running from source:
cargo run --release -- filename.txt
| Key | Action | Key | Action |
|---|---|---|---|
| C-f/C-b | Forward/backward char | M-f/M-b | Forward/backward word |
| C-n/C-p | Next/previous line | C-v/M-v | Page down/up |
| C-a/C-e | Beginning/end of line | M-m | Back to indentation |
| M- | Beginning/end of buffer | M-{/M-} | Backward/forward paragraph |
| M-C-f | Goto matching fence |
| Key | Action | Key | Action |
|---|---|---|---|
| C-d | Delete char forward | C-k | Kill line |
| C-y | Yank (paste) | C-w | Kill region |
| M-w | Copy region | C-t | Transpose chars |
| M-d | Kill word | M-z | Zap to char |
| C-/ | Undo | M-q | Fill paragraph |
| C-x t | Trim trailing whitespace |
| Key | Action | Key | Action |
|---|---|---|---|
| C-s/C-r | Search forward/backward | M-s/M-S | Hunt forward/backward |
| M-% | Query replace | M-r | Replace string (all) |
| Key | Action | Key | Action |
|---|---|---|---|
| C-x C-f | Open file | C-x C-s | Save file |
| C-x C-w | Write file (Save As) | C-x i | Insert file |
| C-x b | Switch buffer | C-x C-b | List buffers |
| C-x k | Kill buffer | C-x n/p | Next/prev buffer |
| C-x C-q | Toggle read-only | C-x C-c | Quit |
| Key | Action | Key | Action |
|---|---|---|---|
| C-x 2 | Split window | C-x 1 | One window |
| C-x 0 | Delete window | C-x o | Other window |
| C-x ^ | Enlarge window | C-x v | Shrink window |
| Key | Action | Key | Action |
|---|---|---|---|
| C-x ( | Start recording | C-x ) | Stop recording |
| C-x e | Execute macro | C-x M-s | Store to slot 0-9 |
| C-x M-l | Load from slot | C-x M-S | Save macros to file |
| C-x M-L | Load macros from file |
| Key | Action |
|---|---|
| F1 | List all key bindings |
| M-? | Describe key |
| M-= | Word count |
| C-x = | Cursor position info |
| Key | Action |
|---|---|
| C-x # | Toggle line numbers |
| C-x s | Toggle syntax highlighting |
Note: C- = Ctrl, M- = Alt or ESC prefix, C-x = Ctrl-X prefix
uEmacs.rs reads configuration from ~/.uemacs.conf (or %USERPROFILE%\.uemacs.conf on Windows):
# Display settings
line-numbers = true
syntax-highlighting = true
# Auto-save (saves to #filename# periodically)
auto-save = true
auto-save-interval = 30
# Tab width for display
tab-width = 8
# Warn before closing modified buffers
warn-unsaved = true
Keyboard macros can be saved to disk and automatically loaded on startup.
File location: ~/.uemacs-macros (or %USERPROFILE%\.uemacs-macros on Windows)
Workflow:
C-x ( ... C-x )C-x M-sC-x M-SFile format: Human-readable text, one key per line:
# uEmacs.rs keyboard macros
[macro.0]
C-a
C-k
C-n
C-y
[macro.3]
M-f
M-d
To stay in line with spirit of the original license of uEmacs/PK 4.0 whos code was used as reference this is licensed under PolyForm Noncommercial 1.0.0. Please see LICENSE.txt, I hope to release this under a more permissive license if possible.
Based on uEmacs/PK 4.0 by Petri Kutvonen, which is based on MicroEMACS 3.9 by Daniel M. Lawrence. Free for non-commercial use.
Copyright Notices:
MicroEMACS 3.9 (c) Copyright 1987 Daniel M. Lawrence. Reference Manual Copyright 1987 by Brian Straight and Daniel M. Lawrence. No copyright claimed for modifications made by Petri H. Kutvonen.
Original statement of copying policy:
MicroEMACS 3.9 can be copied and distributed freely for any non-commercial purposes. MicroEMACS 3.9 can only be incorporated into commercial software with the permission of the current author Daniel M. Lawrence].