vi / vim 简明学习指南

请输入图片描述


本文及图片转载自:http://www.viemu.com/a_vi_vim...html


Use i to enter insert mode,cursor turns from a block into a vertical line,
and you can type in text.vim

经过 i 键进入 Insert 模式,光标会从块状变为竖线,这时你就能够输入文字了。segmentfault

Use Esc to return to normal mode.编辑器

经过 Esc 键返回 Normal 模式spa

Use x to delete the current character.code

经过小写 x 键删除光标当前所在的字符。orm

Use A to go insert text at the end of the line ( wherever you are in the line! ).htm

不管当前光标在什么位置,经过 A 键在当前行末尾进行字符插入。图片

u to undo the last action - traditional vi has a single level,while vim supports unlimited undo ( Ctrl-R to redo ).get

经过小写 u 键能够撤销回退上一次操做 - 老版本的 vi 只支持一级的编辑历史(即:只能撤销或者恢复上一次变化),而 vim 支持无限的撤销操做。

Ctrl-R 能够重作一次上一次变化。

注:可以记录变化的次数随编辑器的不一样而不一样,一般也是能够配置的。

0 jumps directly to the beginning of the line,
$ to the end,
and ^ to the first non-blank.

0 键跳转至当前行开始,
$ 键跳转至当前行末尾,
^ 键跳转至当前行第一个 非blank 字符的位置,
G 键跳转至文件最后一行

注:所谓blank字符就是空格,tab,换行,回车等。

相关文章
相关标签/搜索