From owner-freebsd-doc Fri Sep 6 16:26:34 1996 Return-Path: owner-doc Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA09330 for doc-outgoing; Fri, 6 Sep 1996 16:26:34 -0700 (PDT) Received: from hod (hod.tera.com [206.215.142.67]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id QAA09324 for ; Fri, 6 Sep 1996 16:26:32 -0700 (PDT) Received: from athena.tera.com (athena.tera.com [206.215.142.62]) by hod (8.7.5/8.7.3) with ESMTP id QAA14142; Fri, 6 Sep 1996 16:25:52 -0700 (PDT) From: Gary Kline Received: (from kline@localhost) by athena.tera.com (8.7.5/8.7.3) id QAA25434; Fri, 6 Sep 1996 16:25:51 -0700 (PDT) Message-Id: <199609062325.QAA25434@athena.tera.com> Subject: Re: vi tutorial In-Reply-To: from Annelise Anderson at "Sep 6, 96 03:57:10 pm" To: andrsn@andrsn.stanford.edu Date: Fri, 6 Sep 1996 16:25:51 -0700 (PDT) Cc: kline@tera.com, peter@taronga.com, doc@freebsd.org X-Mailer: ELM [version 2.4ME+ PL23 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-doc@freebsd.org X-Loop: FreeBSD.org Precedence: bulk According to Annelise Anderson: > > > On Fri, 6 Sep 1996, Gary Kline wrote: > > > At any rate, if interested people would send me their > > favor vi commands, I'll toss them into the brew and > > then re-submit. > > > > gary > > Okay, these are my favorites: > > :se nu number lines > "a10dd cut 10 lines of text starting at cursor, saving > it in buffer a; or > "a10yy copy 10 lines of text to buffer a > :e filename edit filename without losing text in named buffers > "ap paste text in buffer a at line following current line > :x,yw filename copy lines x to y (x and y are numbers) to > filename > :x,yw >> filename append lines x to y to filename (there > may be other better ways to do this) > :r !cmd place output of cmd in text at cursor > :r filename read filename into text > :se nonu turn off line numbering > > And some I think you've already got, e.g., nG, Ctrl-G, n (repeat last > search in same direction) and search and replace. > > Given Peter's explanation of the action of the cursor keys when in > insert mode ^H^H^H^H^H^H^H^H^H^H^H^H when inserting: > > "When inserting text you can backspace over inserted text (although it > won't disappear) and overstrike it. The use of any arrow key during > an insertion completes the action (the text you backspaced over will > disappear if not overstruck), moves the cursor in the direction of the > arrow, and leaves you in insert mode ^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H > ^H^H^H^H^H^H^H^H^H starts another insert command." (Footnote: if > you're using vi on a computer running some Un*x other than FreeBSD, > you may need to call nvi instead of vi to make the arrow keys work > this way.) > > I think that paragraph's a correct description of the action of the > arrow keys when in insert, uh, when the insert command is active, but > it may need a little fixing. > (( :-) )) Thanks for your faves, Annelise. I'll wait a few days for others' input, then go ahead with whatever mix I get. One of my most frequently used :set commands is `ai' (and `noai', of course). Re the mode/command discussion, I'm going to stick with mode; and will plug in Peter's explainatory and cautionary notes. Yes, I have typed `.' after hitting ESC. Myriad times. Fortunately, vi has the `u'ndo toggle. later on, gary > > >