免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1981 | 回复: 0
打印 上一主题 下一主题

Using vi(1).《HP-UX Cerfitication学习笔记》 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-02-27 11:02 |只看该作者 |倒序浏览

               
               
Chapter5 Using vi Editor
Three modes in
vi:
*command mode
*input(or insert)
mode
*last line mode(ex
commans mode)

*When you start
vi, it’s in command mode. If you want to go to text insert mode, press “i”. In
the text insert mode, you can’t issue any command. You can go back to command
by pressing “ESC”.

* “~” showing no text
in the line

*One line of text
maybe up 256 character in length. When you press , you go to the
next line.

save the file
after save the
file, you can quit vi by issue “:q” in last line mode
save and quit
save and quit

save the file as “filename” if have no name

quit without
saving

you can add “!”
to any command when you eant to force vi to do something
*Cursor movement
In the command mode(by
pressing ):
move one
character left
move one
character right
move one
character up
move one
character down

move one
character right
go to the last
line of the file
go to the (n)
number line of the file

go to the fist
line of the screen
go to the middle
line of the screen
go to the last
line of the screen

go to the
beginning of the of sentence
go to the end of
sentence

go to the
beginning of the paragraph
go to the end of
the paragraph

go to beginning
of current line
go to end of
current line

go to the
beginning of next word
go to the
beginning of previous word
go to the end of
word

show which line you are on

*Inserting
text
In command mode(pressing
from text-inserting mode)
start inserting text
at the current cursor location
start inserting text
at the beginning of the current line
start inserting
text at the next position relative to current cursor location
start inserting text
at the end of the current line
append a blank
line just below the current line and start inserting text from the beginning og
the new line
append a blank
line just above the current line and start inserting text from the beginning og
the new line

*Deleting
text
In command
mode(pressing  from text-inserting mode)
deleting
character at current cursor  
deleting n
caracters starting at current cursor location
deleting previous
character from the current cursor location
deleting n previous
character from the current cursor location
deleting current
line
deleting previous
word
deleting from
current cursor location to the end of the word
deteling to the
end of the file, including the current line

*Replacing
text
In command mode (pressing
from text-inserting mode)
repalce current character
remaining in command mode
relace current character and
go to insert mode
replace multiple characters
until “ESC” is pressed
change to the beginning of
next word
change the entire line
change to the end of the
file
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/14038/showart_78887.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP