跳到正文

S-Sigdel

vimhjkl

learn vim from your terminal with spaced repetition

README 已保存到本站,可直接阅读

Documentation snapshot

README 快照

这篇是英文原文

下面正文是项目自己的英文 README。想读全文就用浏览器自带的整页翻译: Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」; 手机浏览器一般在菜单里。

本页保存的是公开项目资料快照,阅读过程不需要连接 GitHub。

⚔ vimhjkl

Drills the Vim techniques vimtutor skips, in real vim/nvim, graded on your keystrokes.

图片:AUR version 图片:License: MIT 图片:Lessons 图片:Pure stdlib

66 skills, 230 challenges: dot command, operator+motion grammar, text objects, registers, marks, macros, :g / :normal / ranges, regex and substitution, indentation, joins, paragraph motions. Every challenge is machine-verified against real vim. The goal is shown in a split next to the buffer while you edit.

图片:the menu

Install

macOS / Linux (Homebrew)

brew install S-Sigdel/tap/vimhjkl

Arch Linux (AUR)

yay -S vimhjkl

From source

Needs uv and vim or nvim:

git clone https://github.com/S-Sigdel/vimhjkl && cd vimhjkl
uv sync && uv run vimhjkl

Usage

vimhjkl                                     # interactive menu
vimhjkl --drill                             # Learn mode
vimhjkl --drill --mode blind                # Blind mode
vimhjkl --drill --mode blind --blind-all    # blind sweep of every skill
vimhjkl --practice                          # weakest skills, retry until pass
vimhjkl --reps 6 [--skill ID]               # Grind one skill N times
vimhjkl --review                            # flashcards, no editor
vimhjkl --list                              # curriculum + mastery + skill IDs
vimhjkl --lang zh-CN                        # teaching text in Chinese

Other flags: -n/--count N, --gate D (cap new-skill difficulty), --hide-moves.

ModeWhat it does
LearnShows the technique and the idiomatic move, then you edit
BlindBefore/after only; you recall the move
PracticeWeakest skills, retry until pass
GrindOne skill, N reps back-to-back
ReviewFlashcards, self-rated

Settings (in the menu): toggle lessons, choose language, remap any key in any mode (jk → “, ; → :) — remapped keys are graded as the original — and add “Vim extras”: your own display commands (set norelativenumber, colorscheme habamax) run at drill startup. Drills stay on a clean vim -u NONE so plugins and autocmds can’t skew grading.

How it works

You edit in real vim, not an emulator. The goal sits in a read-only split:

图片:the goal sits beside the buffer

  • Keystrokes are captured with vim -W and scored on correctness and efficiency against a verified par.
  • Command drills (:s, :g, :normal) require an actual ex command; hand-editing to the goal is rejected.
  • Mastery is per-skill: a Leitner box (1–5) for scheduling and unlocks, plus a rep count toward 25, after which the skill moves to a maintenance schedule.
  • A passing attempt is correct and ≤ 2× par. Quitting without saving is an abstain and does not count against you.
  • Harder skills unlock as the tier below is mastered.

All modes write to the same mastery model; the mode only changes how much help you see before editing. Practice records one outcome per skill (best retry); Grind records every rep.

More screenshots

图片:Learn mode

图片:Curriculum

Rebuilding the curriculum

src/vimhjkl/data/skills.json is generated, not hand-edited. Lessons live in build/passes/*.py; content/llm_pool.json holds extra verified instances.

uv run python -m build.generate          # verify every challenge in real vim, write skills.json
uv run python -m tests.test_grader       # grading tests (replays keys through vim)
uv run python -m tests.test_engine       # scheduling/scoring tests
uv run python -m tests.test_i18n         # locale overlay tests

build.generate refuses to write if any challenge fails verification.

Contributing

Adding a technique is a data change, not an engine change. See CONTRIBUTING.md.

License

MIT

Star History

Official distribution

获取与安装

暂未发现可确认的官方软件包地址

当前 README 快照没有出现 npm、PyPI、Crates.io、pub.dev 等官方包页链接。本站不会根据仓库名称猜测下载地址。

本站不托管项目文件;需要安装时,请以项目维护者发布的官方文档为准。

使用前核验

本站保存公开资料用于阅读,不代表安全审计或功能背书。安装前请核对许可证、依赖来源和发布签名,不要直接运行来源不明的二进制文件或高权限脚本。