vi 常用命令

: ---> get-in the end-mode 
/ ---> get in the end-mode
? ---> get in the end-mode
i ---> get in insert @current corse 
a ---> get in append @current corse
esc ---> switch between 'edit-mode' and 'command-mode'
yy ----> copy
p  ----> past
P  ----> past above the last line .
o  ----> new line
dd  ----> delete the current line .
x  ----> delete the current char .
Gloable Replace ------> %s/string_src/string_dest/gc
line Replace    -----> :s/string_src/string_dest/gc
/  ----> find str from top to down  
?  ----> find str from down to top 
set nu ----> display the line number `
set nonu ---> not display the line number .
f   ------> display the current editting file name .
Hex-display  ---> :%!xxd 
Hex-display  ---> :%!xxd -c 12 : hex-display 12byte perline
Hex-display  ---> :%!xxd  -r : return to text form .




o-display    ---> :%!od


Jump to Start of line ------> shift + ^
Jump to End of line   ------> shift + $
Insert at the start of line -----> shift + i
Append at the end of line ------> shift + a
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值