linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx

上传人:b****2 文档编号:13672338 上传时间:2022-10-12 格式:DOCX 页数:10 大小:18.67KB
下载 相关 举报
linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx_第1页
第1页 / 共10页
linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx_第2页
第2页 / 共10页
linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx_第3页
第3页 / 共10页
linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx_第4页
第4页 / 共10页
linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx_第5页
第5页 / 共10页
点击查看更多>>
下载资源
资源描述

linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx

《linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx》由会员分享,可在线阅读,更多相关《linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx(10页珍藏版)》请在冰豆网上搜索。

linux文件编辑vi命令详解Linux file editor VI command detailedWord格式文档下载.docx

2,thebasicoperationofVI

A)enterVI

AfterthesystempromptsymbolentersVIandfilename,entertheVIfullscreeneditscreen:

$VImyfile

ButonethingtopayspecialattentiontoisthatafteryouenterVI,youareinthemode(command),andyouhavetoswitchtoInsertmodetoenterthetext.ThefirstuseofVIpeoplewillwanttousethearrowkeystomovethecursor,thecomputerhasbeencalledbleep,hismad,soafterenteringtheVI,thefirstnottomoveinto"

insertmode(Insertmode)"

!

B)switchtoinsertmode(Insertmode)toeditthefile

Underthecommandlinemode(commandmode),presstheletter"

I"

toenter"

Insertmode"

thenyoucanstarttyping.

C)Insertswitching

Youarecurrentlyinthe"

mode,andyoucanonlyenterthetextallthetime,ifyoufindthewrongword!

Ifyouwanttomovebackwiththecursorkeys,deletethewordfirst,presstheESCkey,gotocommandlinemode(commandmode),andthendeletethetext.

D)quitVIandsavethefile

Inthecommandlinemode(commandmode),click"

:

"

thecolonkeyenters"

Lastlinemode"

forexample:

Wfilename(enter"

Wfilename"

)savethearticleasthespecifiedfilenamefilename.)

WQ(enterWQ,saveandexitVI)

q!

(enterQ,donotsave,forceVI)

3,commandlinemode(commandmode)functionkeys

1)insertmode

Press"

toswitchtoinsertmode"

insertmode"

press"

toentertheinsertmode,thenstartthefilefromthecurrentpositionofthecursor;

Whenyoupressatoentertheinsertmode,enterthetextfromthenextpositioninthecurrentcursor;

Accordingtothe"

O"

intotheinsertmode,istoinsertanewline,startingfromtheinputtext.

2)switchfrominsertmodetocommandlinemode

Pressthe"

ESC"

key.

3)movecursor

VIcanmovedirectlyupanddownwiththecursoronthekeyboard,buttheregularVIuseslowercaseEnglishletters"

H"

"

J"

K"

L"

respectively,tocontrolthecursor,left,bottom,topandright.

Ctrl"

+"

B"

movethescreentotheback.

F"

movethescreentothefront.

U"

thescreenmovesback"

half"

.

d"

movethescreentothefront"

halfpage"

Pressthenumber"

0"

movetothebeginningofthearticle.

G"

movetotheendofthearticle.

$"

movetocursor"

attheendoftheline"

^"

themovetocursor"

W"

thecursorjumpstothebeginningofthenextword

e"

thecursortojumptothenextwordsuffix

PressBtoreturnthecursortothebeginningoftheword

#l"

thecursortothelineofthe#position,suchas:

5L,56l.

4)deletetext

X"

eachtimethecursorisdeleted,acharacterisremovedfromthecursor'

slocation.

#x"

forexample,"

6x"

meansthe6charactersofthebackofthecursorwherethecursorisdeleted.

uppercaseX,andeachtimethecursorisdeleted,acharacterinfrontofthecursorisdeleted.

#X"

20X"

meansthe20charactersinfrontofthecursorwherethecursorisdeleted.

DD"

deletesthecursor'

sline.

#dd"

deleterowsfromthecursorto#

5)copy

YW"

thecursortowherethesuffixcharactersarecopiedtothebuffer.

#yw"

copy#wordstothebuffer

YY"

copythecursorlinetothebuffer.

#yy"

6yy"

meanscopying6linesoftextfromthelineinwhichthecursorislocated.

P"

putthecharactersinthebuffertothecursor'

slocation.Note:

allreplicationcommandsassociatedwith"

Y"

mustworkwith"

tocompletecop

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 幼儿教育 > 幼儿读物

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1