Skip to content

Repository files navigation

Emacs Key Trainer

This repository is a browser-based Emacs key binding reference plus a mini game called Emacs Hero for drilling shortcuts under time pressure.

What this repo does

  • Loads key bindings from public/emacs_keys.yaml.
  • Renders them in searchable sections.
  • Lets you mark sections for training with the section checkbox.
  • Includes a timed trainer mode (Emacs Hero) with score tracking and key sequence matching.

Run locally

  1. Install dependencies:
npm install
  1. Start the local server:
npm start
  1. Open http://127.0.0.1:4173/.

Emacs Hero game

Emacs Hero screenshot

How to trigger it

  1. Hover over the Emacs logo icon at the top of the page.
  2. In the dialog that appears below the icon, click Yes.

What the game is

  • A command prompt is shown.
  • You type the corresponding Emacs key sequence before the timer expires.
  • Correct entries increase score and move to the next round.
  • Wrong entries reset the current chord input.
  • Quit exits the game and clears the filter.

Training pool

  • Only sections with the section checkbox enabled are included in the game pool.

Repository layout

  • index.html: app shell and dialogs.
  • src/main.js: app bootstrap, theme toggle, filtering, section rendering.
  • src/emacshero.js: Emacs Hero game logic and key capture.
  • src/sound.js: game sound effects.
  • src/styles.css: app styling/themes.
  • public/emacs_keys.yaml: editable key binding dataset.
  • server.js: minimal static server for local use.

Forking for other editors

This repo can be forked to build a key trainer for any editor (Vim, VS Code, Helix, JetBrains, etc.).

Typical adaptation steps:

  1. Fork the repo.
  2. Replace public/emacs_keys.yaml with your editor’s key bindings and sections.
  3. Update titles/labels in index.html to match your editor branding.
  4. Adjust parsing/matching rules in src/emacshero.js if your key notation differs.
  5. Tweak styles/colors in src/styles.css.
  6. PULL REQUEST WELCOME

About

collection of emacs reference and customizations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages