|
COMP 2400 Software Tools
Goals: Becoming familiar with the
editor vi
- input mode versus command mode
- Navigation
--Vertical
(j,k,cntl+f, cntl+b,#g, and arrow keys)
--Horizontal
(0, $, h,l,cntl+b, cntl+w, and arrow keys)
- units of text
{ -- beginning of paragraph
{ -- end of paragraph
- yy - yank one line (usually
followed by p, to put)
- dd - delete line
- to substitute throughout the
file
:%s/oldpattern/newpattern/
- se nu //line numbers
se nonu //no line numbers
- :wq or ZZ in command mode to
write and exit
:q! to exit without saving the changes
Useful Links:
|