Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site sdcc3.UUCP Path: utzoo!linus!decvax!ittatc!dcdwest!sdcsvax!sdcc3!bi50xrs From: bi50xrs@sdcc3.UUCP (dragonpup) Newsgroups: net.wanted Subject: quick "vi" guide Message-ID: <3104@sdcc3.UUCP> Date: Wed, 4-Dec-85 20:30:05 EST Article-I.D.: sdcc3.3104 Posted: Wed Dec 4 20:30:05 1985 Date-Received: Sat, 7-Dec-85 16:22:28 EST Organization: lack of Lines: 63 Keywords: bsd 4.2 or better here is just a quick "beginner's" guide to vi. no flaming please. i'm not presupposing any grand knowledge over anyone, a friend asked me to write something and here it is To begin vi, just type & vi filename :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Cursor Movement Commands #h move # times left (default = 1) [ctrl-h does the same] #j move # lines down (default = 1) [ctrl-j,n does the same] #k move # lines up (default = 1) [ctrl-p does the same] #l move # times right (default = 1) [space does the same] #w move # words over (default = 1) #W move # words over ignore puncuation (default = 1) #b move # words backword (default = 1) #B move # words backword ignore puncuation (default = 1) ^ move to beginning of line $ move to end of of line #G move to line # in file (default is end of file) ctrl-d scroll half screen down ctrl-f scroll full screen down ctrl-u scroll half screen up ctrl-b scroll full screen up ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Insert Commands i insert BEFORE the cursor I insert at the beginning of the line a append insert AFTER the cursor A append at the end of the line ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Editing Commands c change from there to the end of the movement d delete from there to the end of the movement #dd delete # entire lines (default = 1) #x delete # number of characters (default = 1) r replace a character :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Special Commands ctrl-r,l redraws the screen u (undo) It undoes the last thing you did, in case you goof. U (undo) everything you did to that line. . (repeat) (That's a period) repeats the last command. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Colon Commands :w write the file and save the changes :w name same, but the changes go into a file with the new name :q leave the editor :q! leave file alone :wq write and quit at the same time ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::