Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucselx!nash From: nash@ucselx.sdsu.edu (Ron Nash) Newsgroups: comp.mail.elm Subject: Re: simple editor for elm ??? Keywords: elm Message-ID: <1990Aug17.160914.3183@ucselx.sdsu.edu> Date: 17 Aug 90 16:09:14 GMT References: <322@lafayet.Lafayette.LA.US> <2459@anomaly.sbs.com> Distribution: na Organization: San Diego State University Computing Services Lines: 73 In article <2459@anomaly.sbs.com> mpd@anomaly.sbs.com (Michael P. Deignan) writes: >rob@lafayet.Lafayette.LA.US (Rob Freyder) writes: > >>I dont need anything fancy... arrow keys that work and a delete key and >>backspace would be sufficient... Maybe even a insert/overstrike toggle key >>but that would be a luxury. >... >>I guess I want a *simple* full screen editor... Search and replace is not >>necessary... >... >>Any ideas ??? We use vi and include a summary of a small set of commands to get users going. Here is the summary: Vi is the "visual" editor for the UNIX machines. It differs from the VAX/VMS editor in that vi is a "moded" editor: you are either in COMMAND MODE or you are in INPUT MODE. In COMMAND MODE, each keystroke is assumed to be a command; in INPUT MODE, each keystroke is put into the file unless it is backspace (the funny "X" key inside the diamond on vt220s) or ESCAPE. ESCAPE terminates the INPUT MODE, and puts you back to COMMAND MODE. If you don't know what mode you're in, hit ESCAPE until your terminal beeps. Then you are in COMMAND MODE. In COMMAND MODE, the most useful commands are: iESC -- goes into INPUT MODE until you hit ESCAPE aESC -- like "i", but APPENDS (after instead of before) x -- deletes (x's out) one character dw -- delete word (up to next blank) dd -- delete whole line o -- open a line up after the current line and go to INPUT MODE r -- replace the char under the cursor with one next character A -- append to end of line (good for putting in forgotten semicolons) 0 -- NOTE: zero, not "oh" -- go to beginning of this line $ -- go to end of this line G -- go to last line in file :1 -- go to first line in file ^d -- that's control-d -- page down ^b -- (control-b) page backward / -- (do not type the < or >) search for n -- search for next occurrence of previous string ZZ -- save edited version and exit ## WARNING!! ^Z saves nothing!! :wq -- same as ZZ ## fg will resume vi if you type ^Z h -- cursor left j -- cursor down k -- cursor up l -- cursor right NOTE: the arrow keys may work (sometimes, on some, but not all, terminals), but once you get in the habit of using hjkl, you'll like it! -- you don't have to pick up your right hand and move it over to the arrows!! Get used to it!! In INPUT MODE, a few keys have special meaning: BACKSPACE -- (the funny "X" key on vt220s) -- erase the last character you just typed. This is not the same as "x" in COMMAND MODE. ESCAPE -- terminate INPUT MODE, putting you back to COMMAND MODE ^d -- undo an auto-indent that just happened NOTE: THE ARROW KEYS ARE INOPERATIVE IN INPUT MODE AND MAY YIELD STRANGE RESULTS. STAY AWAY FROM THE ARROW KEYS! And there is, of course, the "learn" tutorial package, as in % learn -- Ron Nash San Diego State University Internet: nash@ucselx.sdsu.edu UUCP: ucsd!sdsu!ucselx!nash