Table of Contents


Appendix G
vi QUICK REFERENCE

This appendix provides quick reference information on how to use the vi editor.

Substitutions

Substitutions are handled by the ex portion of the vi editor. Refer to Module 43 for further discussion about ex and substituting.

Tags

Tags are discussed in Module 43, which discusses the ex editor.

vi Command Table

This table provides a quick reference to the motion and four most used operators combined with the motions.


Unit of Text Delete Change Copy/(yank) Filter Indent

Character
Current x r yl NA NA
Previous X hr yh NA NA
Next lx lr lyl NA NA
Word
Beginning next dw cw yw NA NA
End current de ce ye NA NA
Beginning previous db cb yb NA NA
Up to next ip\(dg dW cW yW NA NA
Previous ip dB cB yB NA NA
Line
Current dd cc or S yy or Y !! >>
Beginning of d0 c0 y0 NA NA
End of d$ or D c$ or C y$ NA NA
Previous dk ck yk !k >k
Next dj cj yj !j >j
Forward to c dfc cfc yfc NA NA
Back to c dFc cFc yFc NA NA
Sen/Para/Sec
Previous sentence d( c( y( !( >(
Next sentence d) c) y) )! >)
Previous paragraph d{ c{ y{ !{ >{
Next paragraph d} c} y} !} >}
Previous section d[[ c[[ y[[ ![[ >[[
Next section d]] c]] y]] !]] >]]
Screen
Beginning of dH cH yH !H >H
Middle of dM cM yM !M >M
End of dL cL yL !L >L
Searches
Previous pat d?pat c?pat y?pat !?pat >?pat
Next pat d/pat c/pat y/pat !/pat >/pat
Marks
Line marked m d'm c'm y'm !'m >'m
Character marked m d`m c`m y`m !`m >`m
Buffer
Beginning of d1G c1G y1G !1G >1G
End of dG cG yG !G >G
Line number x dxG cxG yxG !xG >xG

Customizing Options

The ex/vi editor has many options that you can set to customize how the editor functions. Please refer to Module 43 for a discription of all supported options.


Table of Contents