Skip to content

Minimal text editor in Rust using the Elm Architecture

License

Notifications You must be signed in to change notification settings

HelgeSverre/token

Repository files navigation

Token - A Multi-Cursor Text Editor

Multi-cursor, code editor inspired by JetBrains IDEs, Vibe-coded in Rust, using Amp Code.
Most of the threads, prompts and conversations with the agent is available to view on my Amp profile.

Rust Amp License: MIT token-editor.com

Token Screenshot


Installation

Pre-built Binaries

Download the latest release for your platform from token-editor.com or GitHub Releases.

Building from Source

Requires the Rust toolchain.

git clone https://github.com/HelgeSverre/token
cd token
make setup    # Install dependencies
make release  # Build optimized binary
make run      # Run the editor

For development:

make dev      # Run debug build (faster compile)
make watch    # Start bacon watch mode

Quick Start

  1. Open a file: token path/to/file.rs or use Cmd+O
  2. Open a folder: token path/to/project/ or use Cmd+Shift+O
  3. Command palette: Cmd+Shift+A for all available commands
  4. Toggle sidebar: Cmd+1 to show/hide the file tree

Keyboard Shortcuts

Common shortcuts (Cmd = Command on macOS, Ctrl on Windows/Linux):

Files & Navigation

Action Shortcut
Save Cmd+S
Open File Cmd+O
Open Folder Cmd+Shift+O
Command Palette Cmd+Shift+A
Go to Line Cmd+L
Find/Replace Cmd+F
Toggle Sidebar Cmd+1

Editing

Action Shortcut
Undo Cmd+Z
Redo Cmd+Shift+Z
Copy/Cut/Paste Cmd+C/X/V
Select All Cmd+A
Duplicate Cmd+D
Delete Line Cmd+Backspace

Multi-Cursor

Action Shortcut
Add cursor Option+Click
Add cursor above Option+Option+Up
Add cursor below Option+Option+Down
Select next match Cmd+J

Note: Option+Option shortcuts are hardcoded and not remappable via keymap.yaml.

Navigation

Action Shortcut
Word left/right Option+←/→
Line start/end Cmd+←/→ or Home/End
Document start/end Ctrl+Home/End
Expand selection Option+↑
Shrink selection Option+↓

For the complete keybinding reference, see docs/KEYBINDINGS.md.


Configuration

Configuration files are stored in ~/.config/token-editor/:

File Purpose
keymap.yaml Custom keybindings
themes/<name>.yaml Custom themes

See the documentation for details:

  • Keybindings — Customize keyboard shortcuts
  • Themes — Create and customize themes

Commands

Run make help for the full command list.

Command Description
make build Build debug binary
make release Build optimized release binary
make run Run release build
make dev Run debug build (faster compile)
make test Run all tests
make fmt Format code
make lint Run clippy lints

Built with AI

Token was built primarily through conversations with AI coding assistants, demonstrating effective human-AI collaboration on complex software projects. The development process, methodology, and all 100+ conversation threads are documented publicly.


Documentation

Document Description
KEYBINDINGS.md Complete keyboard shortcuts reference
THEMES.md Theme customization guide
BUILDING_WITH_AI.md AI-assisted development framework
EDITOR_UI_REFERENCE.md Technical reference for editor geometry
ROADMAP.md Planned features
CHANGELOG.md Version history
CONTRIBUTING.md Contribution guidelines

License

This project is licensed under the MIT License.

The included font, JetBrains Mono, is licensed under the OFL-1.1.

About

Minimal text editor in Rust using the Elm Architecture

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •