通过冰淇淋车学习 Vim 快捷键
Learn Vim motions with an ice-cream van

原始链接: https://thisismodest.com/vimscoops/

学习基础知识,然后就开始吧。刚接触 Vim?请先阅读本文。Vim 仅通过键盘即可编辑文本。无需点击鼠标或按住方向键,你只需按下单个按键即可精确移动光标,例如向前移动一个单词或跳到行尾。这些按键被称为“动作”,正是它们让经验丰富的 Vim 用户拥有极高的效率。本游戏将逐一教授这些动作。在这里,你始终处于“普通模式”,因此每个按键都是一条指令。在按键前输入数字即可重复操作(例如 3j 表示向下移动三行);如果某个按键似乎没有反应,通常是因为它在等待第二个按键(例如先按 f,再按要跳转到的字母)。面板会提示你何时处于等待状态。游戏会教授每一个动作,且每一关只展示当前所需的几个动作。

Hacker News 上的一场讨论批评了 Vim 的传统教学方式,即把“hjkl”导航作为初学者的首要技能。 用户 JdeBP 认为,将“hjkl”置于标准方向键之上已经过时,并指出现在的终端已普遍支持方向键。他们提出,当前的文档仍固守那些不再适合新手的陈旧惯例。JdeBP 建议,早期的教学应侧重于更实用、更通用的导航控制(如 Ctrl+N 和 Ctrl+P),而不是植根于过去终端硬件局限的古老按键绑定。其他评论者则进行了一些抽象且怀旧的交流,但讨论的核心在于 Vim 的教学重点是否需要进行现代化更新。
相关文章

原文

Learn the basics, then you're going.

New to vim? Read this first

Vim edits text with the keyboard alone. Instead of clicking or holding an arrow key, you press single keys that move the cursor precisely, such as one word forward or to the end of a line. Those keys are called motions, and they are what make experienced vim users fast. This game teaches them one at a time.

You're always in Normal mode here, so every key is a command. Put a number in front to repeat (3j moves down three), and if a key seems to do nothing it's usually waiting for a second key, like f then the letter to jump to. The panel tells you when it's waiting.

Every motion the game teaches. Each level only shows the few it needs.

联系我们 contact @ memedata.com