linux vim commands

source:

content:

(1) general form of vi commands: (command)(number)(text object)

or equivalent form: (number)(command)(text object)

 

(2)

i:insert进入insert mode,光标位置不变

I:insert at the begining of the line

a:appending 进入insert mode,光标位置后移一位

A:appending at the end of the line

o:Open blank line below the cursor

O:Open blank line above the cursor

 

h:move left by one space

j:move down by one line

k:move up by one line

l:move right by one space

 

0(digit zero): move to the beginning of the line

$:move to the end of the line

w:move forward by one word

b:move backward by one word

 

c:change + (text object) 通过text object定位更改内容的范围

cc:replace the entire line

C: = c$

 

r:replace by one character without changing mode

R:replacing process will not end until triggering ESC

 

s:更改,以character为计数单位来计数,从当前光标开始

S:更改整行

 

~:change case and move cursor forward by one space

 

d:delete +(text object)来定位删除的范围

dd: delete entire line

D: = d$

 

x:delete the character after the cursor by counting the number of characters(x to d is as r to c)

X:delete the character before the cursor by counting the number of characters

 

u:undo the last command

U: restore the line to its pristine state

 

p:put the last deleted content after current cursor (just like cut and paste)

P:put the last deleted content before current cursor

 

y:yank  +(text object)copy the text and use command p to paste

Y:yy, yank the entire line

 

. :repeat last command

J:join the current line together with the line below

 

(3)总结

 

 

 

 



转载于:https://www.cnblogs.com/KevinFromJail/archive/2012/04/03/2431252.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值