vi / vim 简明学习指南
文章目录

本文及图片转载自:http://www.viemu.com/a_vi_vim...
Use
ito enter insert mode,cursor turns from a block into a vertical line,
and you can type in text.
通过 i 键进入 Insert 模式,光标会从块状变为竖线,这时你就可以输入文字了。
Use
Escto return to normal mode.
通过 Esc 键返回 Normal 模式。
Use
xto delete the current character.
通过小写 x 键删除光标当前所在的字符。
Use
Ato go insert text at the end of the line ( wherever you are in the line! ).
无论当前光标在什么位置,通过 A 键在当前行末尾进行字符插入。
uto undo the last action - traditional vi has a single level,while vim supports unlimited undo (Ctrl-Rto redo ).
通过小写 u 键可以撤销回退上一次操作 - 老版本的 vi 只支持一级的编辑历史(即:只能撤销或者恢复上一次变化),而 vim 支持无限的撤销操作。
Ctrl-R 可以重做一次上一次变化。
注:能够记录变化的次数随编辑器的不同而不同,通常也是可以配置的。
0jumps directly to the beginning of the line,$to the end,
and^to the first non-blank.
0 键跳转至当前行开始,$ 键跳转至当前行末尾,^ 键跳转至当前行第一个 非blank 字符的位置,G 键跳转至文件最后一行。
注:所谓blank字符就是空格,tab,换行,回车等。
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论