ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Vi Editing Mode

Vi Editing Mode

原创 Linux操作系统 作者:keeking 时间:2012-07-10 15:40:37 0 删除 编辑

What to Type

Result

a

append after the cursor

i

insert before the cursor

IText inserted at beginning of line
AText inserted at end of line
RText overwrites existing text

What to Type

Result

x

deletes the character the cursor is under

dd

deletes the line the cursor is on

DEquivalent to d$ (delete to end of line)
ddEquivalent to 0d$ (delete entire line)
CEquivalent to c$ (delete to end of line, enter input mode)
ccEquivalent to 0c$ (delete entire line, enter input mode)
XEquivalent to dh (delete character backwards)
xEquivalent to dl (delete character forwards)

What to Type

Result

j

moves the cursor up one line

k

moves the cursor down one line

h

moves the cursor backwards on a line

l

moves the cursor forward on a line


What to Type

Result

:wq

saves the current changes and exits vi

:w!

saves the current changes but does not exit vi

:q!

exits vi without saving any change

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7899089/viewspace-735085/,如需转载,请注明出处,否则将追究法律责任。

上一篇: grep 命令详解
下一篇: interview tips
请登录后发表评论 登录
全部评论

注册时间:2009-07-23

  • 博文量
    194
  • 访问量
    239072