4、ecursortomatchingparenthesis[[Jumptofunctionstart[{Jumptoblockstart剪切、复制和粘贴yCopytheselectedtexttoclipboardpPasteclipboardcontentsddCutcurrentlineyyCopycurrentliney$CopytoendoflineDCuttoendofline搜索/wordSearch word fromtoptobottom?wordSearch word frombottomtotop*Searchthewordundercursor/cstringS
5、earch STRING or string,caseinsensitive/jo[ha]nSearch john or joan/Search the or breathe/Search the/<¦.>Searchallwordsof4letters//Search fred butnot alfred or frederick/fred
6、joeSearch fred or joe/Searchexactly4digits/^{3}Find3emptyline
7、s:bufdo/searchstr/Searchinallopenfilesbufdo%s/something/somethingelse/gSearch something inalltheopenbuffersandreplaceitwith somethingelse替换:%s/old/new/gReplacealloccurencesof old by new infile:%s/onward/forward/giReplaceonwardbyforward,caseunsensitive:%s/old/new/gcReplacealloccurenceswithconfir
8、mation:2,35s/old/new/gReplacealloccurencesbetweenlines2and35:5,$s/old/new/gReplacealloccurencesfromline5toEOF:%s/^/hello/gReplacethebeginingofeachlineby hello:%s/$/Harry/gReplacetheendofeachlineby Harry:%s/onward/forward/giReplace onward by forward,caseunsensitive:%s/*$//gDeleteallwhitespaces:g
9、/string/dDeletealllinescontaining string:v/string/dDeletealllinescontainingwhichdidn’tcontain string:s/Bill/Steve/Replacethefirstoccurenceof Bill by Steve incurrentline:s/Bill/Steve/gReplace Bill by Steve incurrentline:%s/Bill/Ste