0%

Origin Article By Shaoshan Liu and Jean-Luc Gaudiot

## Vim

• Ctrl + d 向下滚动半屏 Ctrl + u 向上滚动半屏
• w (next word), b (beginning of word), e (end of word)
• gg 移动到文件头 G（shift + g） 移动到文件尾
• 0移动到本行第一个字符上 $ 移动到行尾 • 查找/{regex}, n / N 下一个匹配 • u 撤销（Undo） Ctrl + r 重做（Redo） • 删除d{motion} • e.g. dw is delete word, d$ is delete to end of line, d0 is delete to beginning of line
• 修改c{motion}
• e.g. cw is change word

## Keyboard remapping

As a programmer, your keyboard is your main input method. As with pretty much anything in your computer, it is configurable (and worth configuring).

The most basic change is to remap keys. This usually involves some software that is listening and, whenever a certain key is pressed, it intercepts that event and replaces it with another event corresponding to a different key. Some examples:

• Remap Caps Lock to Ctrl or Escape. We (the instructors) highly encourage this setting since Caps Lock has a very convenient location but is rarely used.
• Remapping PrtSc to Play/Pause music. Most OSes have a play/pause key.
• Swapping Ctrl and the Meta (Windows or Command) key.