```VIM大师```
VIM Master

原始链接: https://github.com/renzorlive/vimmaster

## VIM 大师:在浏览器中学习 Vim VIM 大师是一款免费的浏览器游戏,旨在教你 Vim 文本编辑器的基础知识。只需在浏览器中打开 `index.html` (推荐桌面版),即可访问,它提供专注的关卡,引导你学习核心移动和编辑命令 – 无需安装! 游戏利用 Vim 的普通模式和插入模式,显示你的按键操作,并根据 *结果* 而不是特定的按键序列来验证关卡完成情况。它涵盖了必要的命令,如 `h, j, k, l`,单词/行移动,删除,复制,插入文本,以及在命令中使用计数 (例如 `3w`)。撤销/重做功能 (`u`, `Ctrl+r`) 也包含在内。 VIM 大师使用纯 HTML、CSS (使用 Tailwind CDN) 和 JavaScript 构建,轻量且无依赖。它是一种通过互动练习学习 Vim 强大编辑技巧的好方法。源代码可在 GitHub 上获取,并欢迎贡献!

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 VIMMaster (github.com/renzorlive) 12 分,来自 Fluffyrnz 40 分钟前 | 隐藏 | 过去 | 收藏 | 1 条评论 eej71 9 分钟前 [–] 还有这个:https://vim-adventures.com/回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

VIM Master is a lightweight in-browser game that teaches core Vim motions and editing commands through short, focused levels. No installs required—just open index.html and start practicing.

  • Open index.html directly in your browser.
  • Best viewed on desktop for full keyboard support.

VIM Master Screenshot

  • Normal/Insert modes with an on-screen status bar
  • Command log showing your keystrokes
  • Levels that validate your action outcomes (not just keystrokes)
  • Supports: h j k l, w b e, gg G, 0 $, x, dd, dw, yy, p, i, a, o/O, cw, D, r, ex-commands :q, :wq
  • Numeric counts for motions/operators (e.g., 3w, 2dd, 5x, 5G)
  • Undo/redo support (u, Ctrl+r)
  • Completion modal with Enter to advance
  1. How to Exit (Ex Commands): type :q or :wq then Enter
  2. Basic Movement: h j k l
  3. Word Movement: w b e
  4. Line Jumps: gg G
  5. Insert Mode: a + typing + Esc
  6. Delete Basics: dd, dw, x
  7. Yank & Put: yy, p
  8. Line Bounds: 0, $
  9. Append & Open Lines: a, o, O
  10. Change Word: cw (then type, Esc)
  11. Delete to End & Replace: D, r
  12. Counts: use 3w to move multiple words
  13. Undo/Redo: dd, then u, then Ctrl+r
  • Navigation: h left, j down, k up, l right
  • Words: w next, b back, e end
  • Lines: 0 start, $ end, gg first line, G last line (or nG to go to line n)
  • Insert: i insert at cursor, a append after cursor, o new line below, O new line above
  • Delete: x delete character, dd delete line, dw delete word, D delete to end of line
  • Change: cw change word (deletes word and enters Insert)
  • Replace: r then any printable character (supports symbols like ! @ # < > &)
  • Counts: prefix a number before commands (e.g., 3w, 2dd, 5x, 5G)
  • Undo/Redo: u undo, Ctrl+r redo
  • Exit Insert mode: Esc
  • Each level defines a target cursor location, target text, or target content layout.
  • Validation is resilient to trailing spaces and blank lines where appropriate.
  • You progress when the outcome matches the target; keystroke sequences themselves aren’t strictly enforced.
  • No build step. Just clone and open the file:
# Clone your fork
git clone https://github.com/<your-username>/vimmaster.git
cd vimmaster

# Open directly in a browser (double-click on Windows)
start index.html  # Windows
# or
open index.html   # macOS
# or
xdg-open index.html  # Linux

If your browser restricts local file access, serve it with any static server, for example:

npx serve .  # then visit the printed URL
  • Plain HTML/CSS/JS
  • Tailwind CDN for styling
  • No dependencies, no frameworks

Issues and PRs are welcome!

  • File: index.html contains all the logic and level definitions.
  • Keep code readable and avoid adding heavy dependencies.
  • Favor small, focused levels that teach a single concept well.

MIT

  • Inspired by Vim’s modal editing and motion/operator design.
  • ASCII logo included in the page for flair.
联系我们 contact @ memedata.com