Skip to content

Repository files navigation

monkeyvim

Practice vim like a monkey

Practice Modes

Mode What you practice
motion Navigating with w, b, e, gg, G, %, and more
find Character search with f, F, t, T
delete The d operator combined with motions and text objects
change The c operator for replacing text
yank Copying text with y and pasting with p
random A mix of all the above

Each challenge gives you a starting buffer, a goal state, and optionally a hint. Your edits are validated in real time against the expected result.

Features

  • Real vim keybindings via CodeMirror + @replit/codemirror-vim
  • Multiple difficulty levels per mode
  • Session tracking with time, keystrokes, and score
  • Hint system for when you're stuck
  • Light and dark themes with multiple color schemes
  • Adjustable font size

Tech Stack

Development

Prerequisites

Getting Started

# Clone the repo
git clone https://github.com/your-username/monkeyvim.git
cd monkeyvim

# Install dependencies
bun install

# Start the dev server
bun run dev

Open http://localhost:3000 to start practicing. |

Project Structure

app/                  Next.js app router pages and layout
components/           React components (editor, challenges, selectors)
hooks/                Custom hooks (challenge state, theme, timer)
lib/
  challenges/         Challenge definitions organized by mode
  types.ts            TypeScript interfaces
  themes.ts           Theme definitions

Adding Challenges

Challenges live in lib/challenges/. Each challenge defines:

  • startContent — the initial buffer text
  • expectedContent — what the buffer should look like after the correct edit
  • cursorStart / cursorEnd — starting and expected cursor positions
  • hint — an optional hint string
  • difficulty — a level from 1 to 3

Add new challenges to the appropriate mode file and they'll automatically appear in the app.

TODO

  • Show session summary screen after completing all challenges in a mode
  • Implement better scoring system
  • Persist scores between sessions (local storage or database)
  • Add more challenges across all modes
  • Add compound challenges — multi-step, complex editing tasks beyond single-mode drills
  • Timer system

License

MIT

About

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages