Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 1996 16:25:51 -0700 (PDT)
From:      Gary Kline <kline@tera.com>
To:        andrsn@andrsn.stanford.edu
Cc:        kline@tera.com, peter@taronga.com, doc@freebsd.org
Subject:   Re: vi tutorial
Message-ID:  <199609062325.QAA25434@athena.tera.com>
In-Reply-To: <Pine.BSI.3.94.960906145444.11071A-100000@andrsn.stanford.edu> from Annelise Anderson at "Sep 6, 96 03:57:10 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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




> 
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609062325.QAA25434>