The yank command in vi.
Maarten Jan Huisjes
maartenj at ark.UUCP
Tue Jan 7 01:25:16 AEST 1986
>> ... I contend it would be a more useful and more consistent
>> implementation of Y to yank to end of line.
>
> Have you ever tried the string "y$" ? After all since the vi
> command syntax seems to be <count><command><location> that
> should work! And whadayaknow it does! I bet "d$" and "c$" work
> too but I think "D" is a lot easier. However, "c$" comes in handy
> now and then. You too can makeup new vi commands everyday or maybe
> only every other day! Actually, maybe they're not new except to you.
> Show them to your friends! Post'em to the net! After all, someone
> might be looking for that particular "new" command. :-)
If your version of vi supports the "map" command you could even do this :
:map Y y$
Actually you can just about map everything to anything as long as the
mapped string is a one character or if the string does not start with a
alpha character. It is a very useful command, for instance you can map whole
C-constructions to one or two keys !!
--
Maarten Jan Huisjes. (maartenj at ark.UUCP)
{seismo|decvax|philabs}!mcvax!vu44!ark!maartenj
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list