[comp.editors] vi delete to #, the sequel

wb8foz@mthvax.cs.miami.edu (David Lesher,,255RTFM,255rtfm) (11/23/90)

Thanks,
I've had a bunch of answers pointing out several methods I had
been too blind to see for myself:

:.,nnd 
:.,17d
Try "d120G" to delete up to and including line 120.
   d17G .... delete till line 17
:.+1,17d {this looks different in function}
:.,+12d
:.,12d <return>


were only afew of the answers I got. I've only really tried the 
	d17G
one extensively. I like it pretty well. It also works if you are
on line 32, also!

However, how can I bind it to a key such as K so that
	16K works as: d16G
?
-- 
A host is a host from coast to coast.....wb8foz@mthvax.cs.miami.edu 
& no one will talk to a host that's close............(305) 255-RTFM
Unless the host (that isn't close)......................pob 570-335
is busy, hung or dead....................................33257-0335

dattier@ddsw1.MCS.COM (David W. Tamkin) (11/24/90)

wb8foz@mthvax.cs.miami.edu (David "Mr. Dead" Lesher) wrote in
<1990Nov22.190213.2141@mthvax.cs.miami.edu>:

| However, how can I bind it to a key such as K so that
| 	16K works as: d16G?

:map K Gd''

Cautions: this will, like d<#>G, delete the current line through the <#>th
line inclusively.  Moreover, without a number, this will zap all text from
the beginning of the current line on.

David Tamkin  Box 7002  Des Plaines IL  60018-7002  708 518 6769  312 693 0591
MCI Mail: 426-1818  GEnie: D.W.TAMKIN  CIS: 73720,1570   dattier@ddsw1.mcs.com

cadman@cbnewsm.att.com (jerome.schwartz) (11/27/90)

I have tried to use some of the map functions suggested in previous articles
and can't seem to get them to work.

Where can I find more info on map for my .exrc file.

I have done a man on vi and some other functions but can't find any reference
to map.

Thanks in advance,
Jerry

ed@lvw6.lvw.fac.com (Ed Allen) (11/28/90)

In article <1990Nov22.190213.2141@mthvax.cs.miami.edu> wb8foz@mthvax.cs.miami.edu (David Lesher,,255RTFM,255rtfm) writes:

   >However, how can I bind it to a key such as K so that
   >   16K works as: d16G
The # is an argument to the 'G'.  With no # the default is
to '$' <LAST_LINE_OF_BUFFER>.

You may give other "motion" commands like:

}	end of paragraph
/str	till you find 'str' on a line
?str	backwards "	"
--
Never trust a man who wears white shoes.           | Ed Allen
Vote Libertarian...     Scare the Hell out of 'em. | System Administator
Ignorance can be cured, stupidity is always fatal. | Loral Command & Contr. Sys.
The wise learn much more from fools than fools ever| Leavenworth, Kansas 66048
     will from the wise.                           | (913) 684-7614
"Sure the game is rigged!  But if you don't play   | ed@lvw6.lvw.fac.com
	you can't win!"			| soon to be ed@lvw6.lvw.loral.com