~/dojo $ nvim +VimDojo
vimdojo
Learn Vim motions, Neovim workflows and your own init.lua by solving tiny puzzles in real Neovim. Every key counts: beat par for three stars.
How it works
-
1 Get a puzzle
A short snippet of code or prose, and a goal: fix the typo, land on the bug.
-
2 Solve it with motions
Use real Vim keys. The timer starts on your first keystroke, and every key is counted.
-
3 Beat par
Match the level's par in keys and time for three stars. Then find a shorter way.
Try it
The demo needs a physical keyboard.
Install
Neovim 0.10 or newer. No dependencies. Then run :VimDojo.
lazy.nvim
{ "navasvarela/vimdojo", cmd = "VimDojo", opts = {} }
packer.nvim
use({ "navasvarela/vimdojo" })
vim-plug
Plug 'navasvarela/vimdojo'
rocks.nvim
:Rocks install vimdojo
setup() is optional; see the
configuration options.
Curriculum
Motions 53 levels
The editing language: from hjkl to text objects, registers, macros and Ex commands.
01 Basic Motions
Move without the arrow keys: h j k l, word motions, line edges, and file edges.
j l w b e $ gg ^
6 levels
02 Find and Jump
Get anywhere in a few keys: f t ; , for characters, { } for paragraphs, % for brackets, and counts.
f t ; , } { % count
6 levels
03 Operate
Operators plus motions: d, c, y, the dot command, and text objects.
dw dd cw di" ciw . dap yy p
8 levels
04 Visual Mode
Select first, act second: block selections that edit many lines at once, and pasting over a selection.
<C-v> I <C-v>$ A <C-v>d <C-v>c v p over a selection
5 levels
05 Search
Jump anywhere by content: / and ?, * under the cursor, n for the next match, and cgn to change matches one by one.
/ ? * # n cgn .
5 levels
06 Text Objects
Operate on structure from anywhere inside it: parentheses, brackets, tags, words and sentences.
ci( di[ cit daw yi{ das
6 levels
07 Transform
Change text without retyping it: case, numbers, joining lines, swapping and overwriting characters.
gU <C-a> g<C-a> J gJ x xp R r
6 levels
08 Registers and Macros
Named and appending registers, pasting from Insert mode, and macros: record once, replay anywhere.
"a "A <C-r> q @ macro macro stops on failure
5 levels
09 Ex Power
Command-line editing: substitute, global, sort, normal on ranges, and moving lines.
:s :%s :g :sort :norm :m
6 levels
Usage Neovim only 13 levels
Working in Neovim: windows, buffers, the quickfix list and the defaults it ships with. Each level opens a small project of real files.
10 Windows and Buffers
Split, swap, move and close windows, and hop between buffers.
<C-w>v :vsplit <Tab> completion <C-w>x <C-^> <C-w>o <C-w>L
6 levels
11 Project-Wide Edits
Work across files: follow paths, find files anywhere, and change every file at once with the quickfix list.
gf :vimgrep :cdo :find
3 levels
12 Neovim Built-ins
Defaults that ship with modern Neovim: commenting, repeating :s, quickfix and diagnostic jumps.
gc g& ]q [q ]d [d
4 levels
Setup Neovim only 18 levels
Write and fix an init.lua. Your config runs in a sandboxed Neovim that checks what it does, and shows you as you type what still fails.
13 Options and Keymaps
Write your own init.lua: options, the leader key, and keymaps that do what they say.
vim.o vim.g.mapleader shiftwidth expandtab smartcase <cmd> desc
6 levels
14 Autocommands and Commands
React to events: yank highlights, filetype settings, trim on save, and augroups that survive re-sourcing.
TextYankPost vim.hl.on_yank FileType BufWritePre augroup
4 levels
15 Fix the Broken Config
Each config is broken in a way people really break theirs. Find the bug, fix it with as few keys as possible.
mapleader order option types <CR> in mappings vim.g vs vim.o user commands
5 levels
16 Modern Neovim
APIs and defaults from Neovim 0.11: diagnostics, window borders and the new LSP config.
vim.diagnostic.config winborder vim.lsp.config
3 levels
Every level's solution is proven in real Neovim on every change, and pars are honest. Want to add a level? Packs are plain JSON: write your own.